If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Customization from the Admin / add to cart vs. qty in shopping cart

add to cart vs. qty in shopping cart

Locked

Started by cpk on 23 May 2006, 8:48 PM · Views: 4,247

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
23 May 2006, 8:48 PM
#1
cpk avatar

cpk

New Zenner

Join Date:
Apr 2006
Posts:
37
Plugin Contributions:
0

Post #1 by cpk

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

23 May 2006, 8:55 PM
#2
bunyip avatar

bunyip

Totally Zenned

Join Date:
Sep 2004
Location:
Western Massachusetts
Posts:
2,361
Plugin Contributions:
1

Post #2 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:```
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:```
    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...

23 May 2006, 9:14 PM
#3
cpk avatar

cpk

New Zenner

Join Date:
Apr 2006
Posts:
37
Plugin Contributions:
0

Post #3 by cpk

That did it! Thanks!

cpk

30 May 2006, 2:39 PM
#4
ambook avatar

ambook

New Zenner

Join Date:
Dec 2005
Posts:
35
Plugin Contributions:
0

Post #4 by ambook

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:```
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:```
    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 Sep 2006, 2:06 AM
#5
radish avatar

radish

New Zenner

Join Date:
Jan 2006
Posts:
67
Plugin Contributions:
0

Post #5 by radish

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,

5 Sep 2006, 2:53 AM
#6
radish avatar

radish

New Zenner

Join Date:
Jan 2006
Posts:
67
Plugin Contributions:
0

Post #6 by radish

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