Announcement

Collapse
No announcement yet.

External add to cart with components / attributes

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

    External add to cart with components / attributes

    I've found little info on this. There is one post but it makes little sence to me, and has expired links. The user manual cuts short.

    I want to be able to add an item, with attributes, to cart with a url string.

    I usually use:

    http://www.website.com/cgi-bin/ca000...oks/&NOLOGIN=1

    But I now have some products which have two options:

    'Needle Dimensions'
    'Amount'

    Typical values are:

    '15mm x 0.16dia'
    '100'

    How can I add these options to the url string?

    #2
    You can do this. If you give an example of your page URL we can show you a working example.

    You need to look at the source of the page and then look for the 'name' in the select code. then add that 'name' to the string in the same way as the quantity.

    That will give something along these lines:
    Code:
    http://www.website.com/cgi-bin/ca000001.pl?SID=1&PAGE=PRODUCT&Q_STOCKCODE=1&OptionName1=15mm%20x%200.16dia&OptionName2=100&ACTINIC_REFERRER=http://www.website.com/books/&NOLOGIN=1

    Comment


      #3
      Thanks.. I've looked into it and I cant seem to get it to work.

      Heres a source snippet from one of my product pages:

      Code:
      <SELECT NAME="v_AMPOI1_1">
      <OPTION VALUE=1 SELECTED>07mm x 0.20dia
      <OPTION VALUE=2 >15mm x 0.20dia
      <OPTION VALUE=3 >15mm x 0.25dia
      <OPTION VALUE=4 >30mm x 0.20dia
      <OPTION VALUE=5 >30mm x 0.25dia
      <OPTION VALUE=6 >30mm x 0.28dia
      <OPTION VALUE=7 >30mm x 0.30dia
      <OPTION VALUE=8 >40mm x 0.25dia
      <OPTION VALUE=9 >40mm x 0.28dia
      <OPTION VALUE=10 >50mm x 0.35dia
      </SELECT>
      
      <p>Amount</p>
      <SELECT NAME="v_AMPOI1_2">
      <OPTION VALUE=1 SELECTED>200
      <OPTION VALUE=2 >1000
      <OPTION VALUE=3 >5000
      <OPTION VALUE=4 >10000
      </SELECT>
      Any of these selections will add to cart from the actinic generated page.

      However when I try and convert this to a URL I get:

      A General Script Error Occurred
      Error: Illegal component/attribute combination
      Press the Browser back button and try again or contact the site owner
      I use this url string format

      Code:
      <! --
      http://www.website.com/cgi-bin/ca000001.pl?SID=255&PAGE=PRODUCT&Q_AMPOI1=1&v_AMPOI11_1=30mm%20x%200.20dia&v_AMPOI11_2=200&ACTINIC_REFERRER=http://www.website.com/&NOLOGIN=1
      -->
      What am I doing wrong?

      Comment


        #4
        It's the VALUE bits that you need to emulate.

        After &Q_AMPOI1=1 try adding

        &v_AMPOI1_1=2&v_AMPOI1_2=3

        and see if you now have selected the 2nd and 3rd choices.
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment

        Working...
        X