Announcement

Collapse
No announcement yet.

Single add to cart and add to cart per product

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

    Single add to cart and add to cart per product

    Hi all

    Bit of a long shot, but is it possible to combine the two shopping modes so that a page could have an add-to-cart button for each product AND a single add-to-cart button for the page?


    Be interested to know if anyone has had a tinker to try and achieve this.


    Regards

    Nick
    Hazelnet Web Solutions
    www.hazelnet.co.uk
    Actinic & Worldpay Partners
    Specialising in ecommerce and
    online promotion.

    Workwear and Promotional Clothing
    www.workwearhouse.co.uk
    Logo Your Polo!

    #2
    Just FYI, the reason these two are mutually exclusive as when there is a cart button for each product, each product has its own form tags around it. However, when there is a single add-to-cart button, there is one form for all the products in a section.

    Comment


      #3
      You could do this by having a button that does the Single Add on every product.

      Just add

      <INPUT TYPE=SUBMIT VALUE="Add" NAME="SINGLEADD">

      to your product template. The customer will, of course, have to fill in the quantity first.

      It also wouldn't be too difficult to add a tiny bit of JavaScript that sets the product quantity to 1 if the customer inadvertantly left it at zero.

      E.g.

      Code:
      <INPUT TYPE=SUBMIT VALUE="Add" NAME="SINGLEADD" onclick="var qty = document.getElementsByName('Q_NETQUOTEVAR:PRODUCTREFERENCE'); if ( qty[0].value == '0') qty[0].value = '1';return true;">
      I gave this the 10 second test with IE6, Mozilla and Opera and it seemed OK on all 3.

      Norman
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment

      Working...
      X