I know it's been asked before but can't remember how - I want to add products to the front page with a buy now button but can't work out how to do it - can you experts put me on the right track please?
Announcement
Collapse
No announcement yet.
Add to basket button from front page
Collapse
X
-
Page 45 in the V7 Advanced User Guide describes how to do this:
Adding to Cart from Anywhere on the Internet
The following URL shows you the format to follow to add a product to the cart from anywhere on
the Internet.
http://your.URL/cgi-bin/ca000001.pl?...=PRODUCT&Q_7=5
Advanced Users Guide - 46
The SID parameter should be the section ID of the section where the product can be found. You
can figure out the exact SID by checking the HTML source of the product page (look for <INPUT
TYPE=HIDDEN NAME="SID" VALUE="xxx"> where xxx will be the section ID).
The Q_ parameter informs the script about the product reference and the quantity. The product
reference is the (CGI encoded) string prefixed by Q_ while the quantity is the parameter value
(prod ref is 7, qty is 5 in the above example).
If you are adding from outside the 'acatalog' folder, then ensure you add
ACTINIC_REFERRER=http://your.URL/acatalog/
onto the end of the URL.
Obviously this works only for products where components, attributes, date or other info prompts
are not used. However these more complex products can also be added to the cart on similar way
but more parameters are required (check the HTML source of your product page for hidden input
parameters to see what else required in these cases).
The result of this script call may vary depending on the "Shopping mode" setting of the section
where the product is located. E.g. if your product is located in a section where "Quantity on
Product Page" shopping mode is used then using this link the product will be added to the cart and
a bounce page will drop you back to the last used shop page, but if the shopping mode is "Quantity
in Shopping Cart" then the cart will be displayed clicking on the link.
Note that this solution is not supported by Actinic Software therefore you should use this at your
own risk.
Comment
Comment