Our component supports adding products to the cart by a link from anywhere in your shop or from outside the shop, you can configure this One Page Checkout extension to delete content of the cart before adding a product from url parameters. For an example, have a look on our demo sites.
This extension was firsly created for Magazine subscription where it was the only product on the site. It is particularly usefull for event registration or similarly. The link to the cart can be used from external sites if you are having a specialized marketing site.
In One Page Checkout 2 this feature has extended properties which can be set at the General tab of OPC backend configuration:
Not enabled: This option will turn off the functionality of this feature.
Delete cart content and set link quantity: This option will clear all products from the cart before the one set in the link is added. It will strictly set the quantity of the provided link.
Do not increment quantity and do not delete cart: This option will not add quantity if the product is already found in the cart content. The quantity will not be changed and will remain at the previous state.
Increment quantity and do not delete cart: If the link is accessed twice, the quantity of the product in the link is added twice. Other products will not get affected.
How to create the links
To add quantity of 10 pieces for product with id 270 you can create this sort of link:
OPC1 for Virtuemart 1 style:
OPC2 for Virtuemart 2 style:
OR (for multiple products with multiple quantities):
Will add 10 pieces of product with id 270 and 5 of product with id 280
OPC1 for Virtuemart 1
OPC2 for Virtuemart 2