Free
Download the package from the manager of your site.
How to download?
How to download?
Warning! This package requires MODX not less than
2.3
!
Описание
Add linked products as additional options with an increase in the price of the goods you add.In any form of adding goods to the shopping cart, you can display additional items that will be added as options with a subsequent price increase.
The added options are displayed in the shopping cart near the item.
IMPORTANT: in the linked products list only those products are displayed for which the current item or the specified snippet of msAddLinked.input is the main
msAddLinked.input snippet
For displaying a list of additional goods and input fields. By default, checkboxes are displayed, but, in theory, you can specify any type that is supported by the attribute type of the tag input.
The correct operation of the types text, number. If you specify a number in these input fields, the options to the product in the cart will be added in the appropriate quantity.
Options
msAddLinked.info snippet
It is used to display the list of options added to the product in the cart and in the letters.
Options
Example of a call:
[[!msAddLinked.info? &option=`[[+option.msal]]`]]
In the Fenom Fenom:
{$_modx->runSnippet('msAddLinked.info', ['option' => $product.options.msal])}
If other items options are displayed in the cart, then the following block:
{foreach $product.options as $option}
{var $options = $options ~ $option ~ '; '}
{/foreach}
or{$product.options | join : '; '}
must be replaced by the following:{foreach $product.options as $k => $option}
{if $k != 'msal'}
{var $options = $options ~ $option ~ '; '}
{else}
{$_modx->runSnippet('msAddLinked.info', ['option' => $product.options.msal])}
{/if}
{/foreach}
System settings
Discuss it in MODX.PRO community.
0.3.9-beta
- Added abitility to use custom field for options price
0.3.8-beta
- Fixed radio type behaviour
0.3.7-beta
- Removed price round in JS
0.3.6-beta
- Fixed ability to show option cost instead of price
0.3.5-pl
- Fix &showCost snippet parameter
0.3.4-pl
- Added ability to show option cost instead of price
0.3.3-pl
- Added ability to format prices by MS2
- Small fix PHP notify in msAddLinked.info snippet
0.3.2-pl
- JS fix for JQuery 3.0+
0.3.1-beta
- Added ability to store info about options in order comment
- Some small fixes
0.3.0-beta2
- Some small fixes
0.3.0-beta
- Added ability to use with pdoPage and mSearch2
0.2.1-pl
- Fixed calculate price if no options found
0.2.0-pl3
- Added ability to recalculate price at document ready event
0.2.0-pl2
- Fixed use of an array of field names
0.2.0-pl
- Added ability to use discount for options
0.1.0-pl
- Added ability to use input radio
0.1.0-rc
- Optimized logic and elements
- Removed unnecessary snippet msAddLinked.Cart and outer chunks
0.1.0-beta2
- Added price formatting at front-end
- Fixed system settings
0.1.0-beta
- Public release