RE: Adding a product from another site

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 13219
interpreted = N
texte = Chris ->A company we are making a store for wants to be able to add a product from >their web site directly into the shopping cart. I realize how this is >accomplished using the add command, but the cart is not generated. The url >I'm testing is >http://cyber1.virtualrep.com/scripts/webcatalog/photosphere/shoppingcart.tpl >?command=add&sku=PP&db=catalog.txt&cart=[cart] >I have put this link on a page that is on the store server and it works >fine, but they want to be able to add the product from their web server.Okay, I think I see the problem - since their web server is not running WebCatalog, the [cart] will not be replaced with a valid cart number, but will remain as [cart]. What you should do instead is pass in the necessary information about the product to add as variables and use an [AddLineItem] context on the shoppingcart.tpl page to actually add the item to the cart. This way, you'd use a url like:http://cyber1.virtualrep.com/scripts/webcatalog/photosphere/shoppingcart.tpl?sku=PP&db=catalog.txtand a context like [AddLineItem cart=[cart]&db=[db]&SKU=[SKU]] on the shoppingcart.tpl page to generate a cart number and actually add the item to that cart. You could even put this inside a [showif [referrer]=whatevertheURLforthepageontheirserveris] context to only add that line item if browsers are coming from that page on their server.I hope this helps,Marc Eagle StarNine Technologies http://www.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. RE: Adding a product from another site (Marc Eagle 1997)
Chris ->A company we are making a store for wants to be able to add a product from >their web site directly into the shopping cart. I realize how this is >accomplished using the add command, but the cart is not generated. The url >I'm testing is >http://cyber1.virtualrep.com/scripts/webcatalog/photosphere/shoppingcart.tpl >?command=add&sku=PP&db=catalog.txt&cart=[cart] >I have put this link on a page that is on the store server and it works >fine, but they want to be able to add the product from their web server.Okay, I think I see the problem - since their web server is not running WebCatalog, the [cart] will not be replaced with a valid cart number, but will remain as [cart]. What you should do instead is pass in the necessary information about the product to add as variables and use an [addlineitem] context on the shoppingcart.tpl page to actually add the item to the cart. This way, you'd use a url like:http://cyber1.virtualrep.com/scripts/webcatalog/photosphere/shoppingcart.tpl?sku=PP&db=catalog.txtand a context like [AddLineItem cart=[cart]&db=[db]&SKU=[SKU]] on the shoppingcart.tpl page to generate a cart number and actually add the item to that cart. You could even put this inside a [showif [referrer]=whatevertheURLforthepageontheirserveris] context to only add that line item if browsers are coming from that page on their server.I hope this helps,Marc Eagle StarNine Technologies http://www.smithmicro.com/ Marc Eagle

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Problem with [isFile] [isFolder] (wc 3.0.4, iis 4) (1999) OT: IP addres checking (2003) Further tests with the infamous shipCost (1997) ShipTotal Again (1998) Re:2nd WebCatalog2 Feature Request (1996) error message (sorry) (2000) Harvesting invalid email addresses from bounced emails??? (2000) Storebuilder Seems to have just died (2003) Can [formvariables] do this? (2000) Expert tech support -- a fast and simple solution (long) ... (2000) Displaying raw values (long) (1998) Include a big block of text (1997) ListFiles Sorting (2000) Country & Ship-to address & other fields ? (1997) Emailer (1997) Execute Applescript (1997) [WebDNA] maybe silly suggestion? [founditems] (2015) Emailer Message not seen in Emailer Code FAQ (2002) WebCat2b13MacPlugIn - [include] doesn't allow creator (1997) Multiple catalog databases and showcart (1997)