Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2006
    Posts
    37
    Plugin Contributions
    0

    add to cart vs. qty in shopping cart

    I have searched and been unable to find an answer to this question. I want to have "add to cart" buttons on the product listings pages and individual product description pages but I want to allow the customer to change the quantity in the shopping cart page. It seems that the only way to get quantity control on the shopping cart is to enable qty across all of these pages. Is it possible to change this in Admin or does this require custom coding/modification to templates or scripts?

    Thanks,

    cpk

  2. #2
    Join Date
    Sep 2004
    Location
    Western Massachusetts
    Posts
    2,945
    Plugin Contributions
    5

    Default Re: add to cart vs. qty in shopping cart

    You can't change that behaviour from Admin. To achieve it, make an override copy of includes/templates/template_default/templates/tpl_shopping_cart_default.php and change this section of code:
    Code:
      if ($product['flagShowFixedQuantity']) {
        echo $product['showFixedQuantityAmount'] . '<br /><span class="alert bold">' . $product['flagStockCheck'] . '</span><br /><br />' . $product['showMinUnits'];
      } else {
        echo $product['quantityField'] . '<br /><span class="alert bold">' . $product['flagStockCheck'] . '</span><br /><br />' . $product['showMinUnits'];
      }
    to this:
    Code:
        echo $product['quantityField'] . '<br /><span class="alert bold">' . $product['flagStockCheck'] . '</span><br /><br />' . $product['showMinUnits'];
    Neville
    An assumption is what you arrive at when you get tired of thinking...

  3. #3
    Join Date
    Apr 2006
    Posts
    37
    Plugin Contributions
    0

    Default Re: add to cart vs. qty in shopping cart

    That did it! Thanks!

    cpk

  4. #4
    Join Date
    Dec 2005
    Posts
    36
    Plugin Contributions
    0

    Default Re: add to cart vs. qty in shopping cart

    Quote Originally Posted by bunyip
    You can't change that behaviour from Admin. To achieve it, make an override copy of includes/templates/template_default/templates/tpl_shopping_cart_default.php and change this section of code:
    Code:
      if ($product['flagShowFixedQuantity']) {
        echo $product['showFixedQuantityAmount'] . '<br /><span class="alert bold">' . $product['flagStockCheck'] . '</span><br /><br />' . $product['showMinUnits'];
      } else {
        echo $product['quantityField'] . '<br /><span class="alert bold">' . $product['flagStockCheck'] . '</span><br /><br />' . $product['showMinUnits'];
      }
    to this:
    Code:
        echo $product['quantityField'] . '<br /><span class="alert bold">' . $product['flagStockCheck'] . '</span><br /><br />' . $product['showMinUnits'];
    I did this but now I can't updated my quantity in my cart. No matter what I put in the box, when I click the updated cart button, it stays at the same quantity as before. Can you help? Thanks.
    Eric

  5. #5
    Join Date
    Jan 2006
    Posts
    67
    Plugin Contributions
    0

    Default Re: add to cart vs. qty in shopping cart

    Hi,

    I was looking for this solution 2 days ago and it was working excellently, but since upgrading to 1.3.5 I'm not getting a text box in the cart anymore? After the upgrade I made sure to make the neccessary changes in the custom template folder, but still nothing.

    Is the text box appearing in the cart dependant on other switches being set? Or did something change with the upgrade?

    Cheers,

  6. #6
    Join Date
    Jan 2006
    Posts
    67
    Plugin Contributions
    0

    Default Re: add to cart vs. qty in shopping cart

    Sorry, my bad. I didn't replace enough code! All is good

 

 

Similar Threads

  1. Replies: 4
    Last Post: 15 Jan 2014, 04:17 AM
  2. v150 Multiple Product and qty add in Shopping cart
    By jalpesh in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 30 Aug 2012, 12:07 PM
  3. Replies: 2
    Last Post: 22 May 2011, 05:13 PM
  4. Replies: 1
    Last Post: 10 Sep 2009, 09:14 PM
  5. QTY in shopping cart
    By ginginca in forum General Questions
    Replies: 3
    Last Post: 17 Dec 2006, 11:08 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR