If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.
Is it possible to have a coupon add an item to the cart that is exclusively available with this coupon? We wouldn't want the item to be able to be purchased by customers who do not use the coupon.
Foreman2 That functionality is not available natively but can be accomplished with some template code. You could create a checkbox product custom field called "Not for Sale" and check the box for products only available via coupon. Then on the PROD template select the newly created custom field in the Product Display Layout section so that it is available via a template variable. Finally, find the add to cart button in the template and wrap it in a conditional that check the custom field, something like this (note there may be multiple places the add to cart button appears in your framework):
Code:
<mvt:if expr="l.settings:product:customfield_values:custom fields:not_for_sale NE 1">
<mvt:item name="buttons" param="AddToBasket"/>
</mvt:if>
This will hide the add to cart button for the product if the "Not For Sale" product custom field is checked, thus allowing you to create the Add-on Product promotion. Note remember to add a 1 to the Restrict to Qualifying Quantity when creating the price group to ensure that the add on product (qualifying product) is removed from basket if the coupon is removed.
Comment