Unless the other site is also running ShopSite you would need to find out how their shopping cart does the add to cart. Different carts function differently. I'm not sure how many of them even have a feature like the Order Anywhere links in ShopSite.
If the other site is running ShopSite then you would need to get the info for the add to cart button for that store. You would need the url to the shopping cart, storeid, product id or sku and what ever image/text you are using for the add to cart button.
Since the normal template tags used for this data are for your store, you would need to use other product fields to contain this data.
The Order Anywhere links look like this if you have an sku:
- Code: Select all
<a href="URL_TO_ORDER.CGI?storeid=ENCRYPTED_STORE_ID&dbname=products&sku=PRODUCT_SKU&function=add"><img src="URL_TO_BUTTON_IMAGE" border="0" alt="Add To Cart"></a>
or like this if you have a product id:
- Code: Select all
<a href="URL_TO_ORDER.CGI?storeid=ENCRYPTED_STORE_ID&dbname=products&itemnum=PRODUCT_ID&function=add"><img src="URL_TO_BUTTON_IMAGE" border="0" alt="Add To Cart"></a>
So your would need to either add the values for the UPPERCASE data above to some of the Extra product fields or put the entire thing into one of the product fields and modify your template to use those fields.
The code to determine if a product is from your site or the other site could be done by checking the value in one of the extra product fields.
- Code: Select all
[-- IF PRODUCT.FIELD1 "" --]
this is on your site since the product field 1 is blank so do the normal code here
[-- ELSE --]
<a href="[-- PRODUCT.FIELD1 --]?storeid=[-- PRODUCT.FIELD2 --]&dbname=products&sku=[--PRODUCT.FIELD3 --]&function=add"><img src="[-- OUTPUT_DIRECTORY_URL --]/media/buy_ebook.jpg" border="0" alt="Add To Cart"></a>
[-- END_IF --]
You would need to configure the product extra fields so that Field 1 contains the complete url to order.cgi in the other store, Field 2 contains the other store's storeid (preferable the encrypted version), Field 3 contains the sku, and you would need to create an image for the BUY EBOOK and upload it to the image directory for your store (note: I called it buy_ebook.jpg in the code above so change if necessary). The section just after [-- IF PRODUCT.FIELD1 "" --] would contain what is currently used to generate the add to cart buttons.