Download the PHP package studioraz/magento2-simple-product-link-luma-theme without Composer

On this page you can find all versions of the php package studioraz/magento2-simple-product-link-luma-theme. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package magento2-simple-product-link-luma-theme

Magento 2 Simple Product Link Luma Theme

A standalone Magento 2 module that links independent products together and renders a variation switcher on Luma/Blank-based Product Detail Pages. Every linked item remains a standalone catalog product with its own PDP and native product-type behavior.

Designed for Luma/Blank-based storefronts — uses Magento layout XML, PHTML, native Swatches APIs, and module LESS. It does not depend on studioraz/magento2-simple-product-link.

This package is a standalone alternative to the Hyvä-oriented module, not a companion package. Do not enable both implementations in the same Magento installation because they intentionally use the same product attribute, admin route, event prefix, and database tables.


Table of Contents


Features


How It Works

  1. Products are grouped by assigning the same value to the simple_product_group attribute.
  2. An admin-defined Link Rule specifies which variation attributes to display and which products the rule applies to (via catalog-rule conditions).
  3. On the storefront, the module's plugin appends a variant switcher block immediately after the price. Each variant is a clickable link to the sibling product's PDP.

For composite products, the switcher links whole parent products. It does not replace Magento's configurable, grouped, downloadable, or bundle option renderers and does not carry selected child options between PDPs.


Requirements

Requirement Version / Notes
Magento 2.4.x
PHP Per Magento 2.4 requirements
Theme Magento Luma/Blank or a compatible child theme
SR_Base module Must be installed and enabled

Installation

Via Composer (private repository)

Manual installation

  1. Copy the module to app/code/SR/SimpleProductLinkLumaTheme/.
  2. Run:

The data patch will automatically create the simple_product_group product attribute on first install.


Configuration

1. Create a Link Rule

Navigate to Admin → Studio Raz → Simple Product Link → Link Rules and click Add New Rule.

Field Description
Name Human-readable rule name (required).
Description Optional notes about the rule's purpose.
Active Enable or disable the rule.
Variation Attributes One or more select-type attributes (e.g., Color, Size). Drag-and-drop to set display order.
Priority Integer — higher value = higher priority. When multiple rules match a product, only the highest-priority rule is applied.
Conditions Standard Magento catalog-rule conditions to target specific products. Leave empty to match all products.

2. Assign Products to a Group

  1. Open a product in Admin → Catalog → Products.
  2. Set the Simple Product Group attribute to a shared group identifier (any arbitrary string, e.g., blue-widget-family).
  3. Repeat for every sibling product in the group. Ensure each product has a different value for the variation attribute(s) defined in the matching rule.

Frontend Behavior

Display Rules

Condition Result
Product has no simple_product_group value No switcher displayed
Group has only 1 product No switcher displayed
An attribute has only 1 unique option across group products That attribute row is hidden
Product type is simple, virtual, downloadable, configurable, grouped, or bundle Product can participate in the switcher
No active rule matches the product No switcher displayed

When conditions are met, the switcher renders after the price in product.info.main, with one row per variation attribute.

Swatch Support

Type Rendering
Color swatch Colored square with the configured background color.
Image swatch Square with the swatch image as background.
Text swatch Text label inside a bordered option.
Regular select Linked-product thumbnail with the option label exposed through accessible text and tooltip.

Out-of-Stock Handling

Behavior depends on Stores → Configuration → Catalog → Inventory → Display Out of Stock Products:

Sorting & Display Order

What is sorted Controlled by Where to change
Attribute group order (e.g., Color row above Size row) Variation Attributes sort order in the Link Rule Admin → Link Rules → Drag-and-drop
Options within a group (e.g., Red, Blue, Green) Attribute option sort order Admin → Stores → Attributes → Product → [Attribute] → Manage Options

Cache Invalidation

The module implements a three-layer cache strategy:

  1. Rule changes (create / update / delete) — Flushes the full-page cache entirely via observers on studioraz_simpleproductlink_rule_save_after and _delete_after.
  2. Product group changes — When a product's simple_product_group value is modified, all sibling products in both the old and new groups are invalidated.
  3. Composite stock changes — When a child product's stock changes, the resolver also includes its configurable, grouped, or bundle parents and invalidates the linked groups assigned to those parents.
  4. Cache tag propagation — The switcher block exposes a group cache tag, so Varnish / FPC invalidation can purge related variant pages together.

Troubleshooting

Symptom Possible Cause Solution
Variant switcher does not appear Product has no simple_product_group value Set the attribute on the product and its siblings
Variant switcher does not appear Group contains only 1 product Add at least one more sibling with the same group value
Variant switcher does not appear No active Link Rule matches Verify rule is active and its conditions include the product
Stale switcher after rule change FPC not flushed Flush cache: bin/magento cache:flush full_page
Attribute row missing Only 1 unique option exists in the group for that attribute Ensure siblings have different values for the variation attribute
Swatches show as text labels Swatch data not configured Configure swatches under Admin → Stores → Attributes → Product → [Attribute] → Manage Options

License

MIT — © Studio Raz. All rights reserved.


All versions of magento2-simple-product-link-luma-theme with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
magento/framework Version >=103
studioraz/magento2-base Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package studioraz/magento2-simple-product-link-luma-theme contains the following files

Loading the files please wait ...