Forums / Templates, Stylesheets, Page Layout / Shopping Cart: Update Qty Button Issue

Shopping Cart: Update Qty Button Issue

Locked
Results 1 to 6 of 6
This thread is locked. New replies are disabled.
27 Nov 2006, 22:42
#1
webomat avatar

webomat

Zen Follower

Join Date:
Jan 2005
Posts:
128
Plugin Contributions:
0

Shopping Cart: Update Qty Button Issue

Been looking and testing... can't find a solution:

What do I need to do so that the Update Qty Button does not show in the shopping cart next to products that have a Min/Max of 1? In other words, they don't have a qty box to edit so there's no reason for the update button there... however, I do want to have it appear next to products that do not have a max limit of 1 and therefore have the qty box available.

Hope that makes sense!

Thanks in advance for your help.

Cheers,

Becky
28 Nov 2006, 03:34
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Posts:
62,757
Plugin Contributions:
1

Re: Shopping Cart: Update Qty Button Issue

In the Stock settings ... this would change the location for all products ...
Show Shopping Cart - Update Cart Button Location
Show on Shopping Cart Update Cart Button Location as:

1= Next to each Qty Box
2= Below all Products
3= Both Next to each Qty Box and Below all Products


that also is used to work with the delete button as well ...

If you don't want to see it on products with max 1 only you would have to customize the code ...

Perhaps setting the update button to below the list of products would work for you?
28 Nov 2006, 04:45
#3
webomat avatar

webomat

Zen Follower

Join Date:
Jan 2005
Posts:
128
Plugin Contributions:
0

Re: Shopping Cart: Update Qty Button Issue

Ajeh:

In the Stock settings ... this would change the location for all products ...


that also is used to work with the delete button as well ...

If you don't want to see it on products with max 1 only you would have to customize the code ...

Perhaps setting the update button to below the list of products would work for you?


Hi Linda,

Yeah, customize the code... the magic words! "-) Actually I have played at that this afternoon but couldn't get it to do what I wanted.

I read through the process that creates $display_button (I think that is what the shopping_cart page echoes) and tried a myriad of conditional statements in tpl_shopping_cart_default. Could totally get rid of it, or get rid of it on the item with the qty box but leave it on the no-qty box items. ?? hehe. I tried using the $product['flagShowFixedQuantity'] and $product['showFixedQuantityAmount'] and even $product['quantityField'], all in various tests... nada. I even flat out said "if product id is X" and that didn't work the way I expected.

This is truly confusing me.. in the last 3 days I've hammered out some major mods that I thought were over my head and now I can't get something this simple to work. Could it be the 16 pots of coffee I had today? :shocking:

Can you give me some direction on what I should be doing here?

Thanks a lot Linda!

Becky
28 Nov 2006, 06:07
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Posts:
62,757
Plugin Contributions:
1

Re: Shopping Cart: Update Qty Button Issue

You could alter the $buttonUpdate to be '' when $show_products_quantity_max = 1 ...
28 Nov 2006, 16:13
#5
webomat avatar

webomat

Zen Follower

Join Date:
Jan 2005
Posts:
128
Plugin Contributions:
0

Re: Shopping Cart: Update Qty Button Issue

Ajeh:

You could alter the $buttonUpdate to be '' when $show_products_quantity_max = 1 ...


Morning Ajeh!

Thanks for the suggestion!

Ultimately I got it to work, but I couldn't use what you suggested... probably because I'm doing it wrong. "-)

Here's what works -- at least in testing:

In tpl_shopping_cart_default this is the original...
  if ($product['buttonUpdate'] == '') {
    echo '' ;
  } else {
    echo $product['buttonUpdate'];
  }


I changed it to...
  if ($product['flagShowFixedQuantity'])


That worked. Shows properly across different "test clients" and products, updates the field, hasn't deleted any other products, etc.

I thought I tried that last night and didn't get the correct results. It's possible that my system was getting clunky... I've had a lot of problems running this new version of ZC with Xampp using Opera 9xx on this computer; runs much better on a clunky old notebook so I know it's not ZC but something about this system. Anyway I'll stop rambling and make coffee!! :D

If you know of any reason that won't work in "real life", please let me know.

Thanks again for your help, Linda!

Cheers,

Becky
28 Nov 2006, 19:08
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Posts:
62,757
Plugin Contributions:
1

Re: Shopping Cart: Update Qty Button Issue

I was higher up in the code in the /pages/shopping_cart ...