Announcement

Collapse
No announcement yet.

Adding to cart from anywhere, with a twist?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Adding to cart from anywhere, with a twist?

    I understand how I can add a simple product to the cart, with a link, but what i'm interested in, is how this sort of link would react, if my product had sizes and such.

    i'm assuming that an add to cart button passes all the form elements, via _GET to the cart script, and therefore, i'd have to harvest the dropdowns and other clickys, and pass them too?
    Last edited by KB2; 23-Mar-2010, 10:11 AM. Reason: Updating kb links

    #2
    The query string would need extended to contain &name=value pairs for each Attribute, Component as well as the Other Info and Date Prompts (day, month, year needed there).

    Easiest way to see what's needed would be to create al "all-singing all-dancing" product and see what's in the Cart call.

    I've done this fully in my Norcat application that builds an Actinic site from a shops stock database. All the HTML needed to add the product to the Cart is custom built, skipping most of the Actinic product layout code completely.

    A webby-2 way of doing this might be to put markers around the HTML that deals with the variants and prompts, retreive the page source and extract just the bit of HTML needed, then append it to the off-site page.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment

    Working...
    X