Order anywhere - Can I do this with the add to cart link?

General ShopSite user discussion

Order anywhere - Can I do this with the add to cart link?

Postby David Gray » Wed Mar 15, 2006 3:09 pm

I understand from other posts that it's possible to customize the add to
cart link (with Order Anywhere) so for example I can enable variable pricing
and include a custom price and name by adding:

....&id:price=20&id:name=Some text here

Where id is the shopsite record number for the product. Can I extend this to
add other fields from the Order API spec? I'm thinking in particular of the
generic product fields which are called Field1, Field2, Field3...? (I'd like
to pass my customer's id through to a custom Order API script.) Field1
appears to be accepted by the order.cgi but I thought I'd check first.

Secondly, is it ok to create an html form to POST these extra fields instead
of via the URL?

--

David P. Gray
Gray Design Associates
David Gray
 

Re: Order anywhere - Can I do this with the add to cart link

Postby Rob » Wed Mar 15, 2006 8:12 pm

You cannot pass dynamic data with a product such as customer id and have it
retained by the cart (unless you are creatively using the variable name/sku
options for encoding data). Your best option is to make use of the custom
checkout fields in ShopSite Pro for collecting or passing (hidden) data for
each order that you can process with an order API and will be attached to
the order upon completion. You could pass data in the per product customer
text entry box but this will be seen by the customer and can be altered by
them as well.

Yes, you can use a POST command instead of GET for passing data to the cart.

Rob

"David Gray" <david@nospam.dgray.com> wrote in message
news:dv9vgp$gf2$1@eval.shopsite.com...
I understand from other posts that it's possible to customize the add to
cart link (with Order Anywhere) so for example I can enable variable
pricing
and include a custom price and name by adding:

...&id:price=20&id:name=Some text here

Where id is the shopsite record number for the product. Can I extend this
to
add other fields from the Order API spec? I'm thinking in particular of
the
generic product fields which are called Field1, Field2, Field3...? (I'd
like
to pass my customer's id through to a custom Order API script.) Field1
appears to be accepted by the order.cgi but I thought I'd check first.

Secondly, is it ok to create an html form to POST these extra fields
instead
of via the URL?

--

David P. Gray
Gray Design Associates

Rob
 


Return to User Forum

Who is online

Users browsing this forum: Bing [Bot] and 160 guests