Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / update button on shopping cart page has been disabled

update button on shopping cart page has been disabled

Locked

Views: 1,932

Results 1 to 20 of 22
This thread is locked. New replies are disabled.
11 Mar 2010, 9:45 PM
#1
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

update button on shopping cart page has been disabled

OK, somewhere along the course of my various modifications/enhancements/configurations, I have managed to disable the "update" buttons on my site.

Anyone want to venture an idea of what I might have done to screw this up?

https://www.cinderellaantiques.com

Thanks.

11 Mar 2010, 11:18 PM
#2
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

Re: update button on shopping cart page has been disabled

A bit more detail: when on the shopping cart page, the individual item update buttons are "disabled;" that is, they just appear as images. They're not linked to any action.

The update cart button at the bottom of the page still works, though. Weird...is this a configuration error on my part?

Thanks for any help.

13 Mar 2010, 4:50 AM
#3
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

Re: update button on shopping cart page has been disabled

Can ANYONE shed some light on this for me? This is like my last layout issue to resolve before I tackle shipping in earnest.

Thanks...

13 Mar 2010, 10:44 AM
#4
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: update button on shopping cart page has been disabled

Probably a glitch by your template designer

This:
**
<img src="includes/templates/an_upscale_boutique/buttons/english/button_update.jpg"**

should be this:

<input type="image" src="includes/templates/an_upscale_boutique/buttons/english/button_update.jpg"

14 Mar 2010, 3:08 AM
#5
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

Re: update button on shopping cart page has been disabled

Thanks, Steve. I discovered the problem (it was of my doing) and corrected it. The only issue now (and this is minor) is that the button that displays is "update cart." I think it should be "update." Any idea where I would make an approriate change to fix this?

I really appreciate the help.

14 Mar 2010, 2:14 PM
#6
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: update button on shopping cart page has been disabled

Your buttons are images, so you'd need to edit button_update_cart.jpg in some imaging software. Since I have almost no image manipulation skills, if it were me I'd leave it.

There could be another update button in that button set, though.

14 Mar 2010, 4:24 PM
#7
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

Re: update button on shopping cart page has been disabled

Oh, I wasn't talking about editing the actual image. Besides, there is indeed a button already that just says "update." For some reason, though, my ZC doesn't seem to use both buttons.

Neither button_names.php nor icon_names.php define a constant for the file button_update_cart.jpg. That seems mildly odd, since there is such a button. The fix seems to be to change the definition of one or the other, and the corresponding reference in the code.

In tpl_shopping_cart_default.php, there's a bit of code:

<?php echo zen_image_submit(ICON_IMAGE_UPDATE, ICON_UPDATE_ALT); ?></div>

I'm not entirely sure I understand what I'm looking at here, but if I define a constant for button_update_cart.jpg in button_names.php, and use it here, might that work?

Thanks.

14 Mar 2010, 4:54 PM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: update button on shopping cart page has been disabled

On a brand new clean uncustomized Zen Cart, those buttons work just fine.
Your problem is almost certainly in one or more of the customizations you've made, and/or maybe an addon or template you've added to your site.
Likely an HTML syntax error which is breaking the ability for the buttons to do what they're supposed to do. Maybe you've got closing </form> tags somewhere they don't belong? Maybe you've got unclosed other tags in your template? Could be a number of things.
But, you don't need to go defining new constants to get the built-in functionality to work.

If your HTML isn't validatable, then I suggest you start fixing that part before you go hacking around in PHP.

14 Mar 2010, 5:02 PM
#9
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

Re: update button on shopping cart page has been disabled

Hi,

As noted above, I discovered the cause of the non-functioning button. It was indeed my error. That's been corrected, and the button now functions OK.

Now, I'm trying to fix a much more minor problem. For some reason, my shop is using the "update cart" button where I believe it should be using the "update" button. As mentioned above, both button_names.php and icon_names.php reference the "update cart" button file, and there doesn't appear to be any definition for BUTTON_IMAGE_UPDATE_CART as there is for BUTTON_IMAGE_UPDATE.

I'm just trying to get what I think are the proper buttons to appear in the right places. But, given the constant definitions I see, I don't know how to do this without making a php change.

14 Mar 2010, 5:34 PM
#10
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,621
Plugin Contributions:
0

Re: update button on shopping cart page has been disabled

The original define is:
define('BUTTON_IMAGE_UPDATE', 'button_update.gif'); ( in button_names)

and the original icon is:
define('ICON_IMAGE_UPDATE', 'button_update_cart.gif');

They are different - get your image names corrected in the correct files and you have it fixed.

14 Mar 2010, 6:00 PM
#11
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

Re: update button on shopping cart page has been disabled

Except that BUTTON_IMAGE_UPDATE isn't used by tpl_shopping_cart_default.php. It uses ICON_IMAGE_UPDATE instead. Hence the problem.

Like I said, I'm not 100% sure this is really a bug, but...it seems odd. After all, there is a difference (a subtle one, admittedly) between an item update and a cart update, and it would be nice if the buttons more accurately reflected the actions they take.

14 Mar 2010, 6:24 PM
#12
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

Re: update button on shopping cart page has been disabled

Upon further reflection, perhaps I'm making a mountain out of a molehill on this one. If no one else sees a problem with it, I'm content to let this one go. (Besides, it's time for me to turn my attention toward getting shipping worked out on my site!)

14 Mar 2010, 6:42 PM
#13
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,621
Plugin Contributions:
0

Re: update button on shopping cart page has been disabled

Just change the define in the appropriate place to use whatever image you want ...

14 Mar 2010, 6:56 PM
#14
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

Re: update button on shopping cart page has been disabled

I just changed the file reference in header_php.php. That appears to have done the trick. (My first effort at this didn't work out...some issue with mixing and matching buttons and icons.)

Anyway, I think I've beaten this one to death. Thanks to all who helped. On to shipping.

14 Mar 2010, 7:31 PM
#15
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,621
Plugin Contributions:
0

Re: update button on shopping cart page has been disabled

I just changed the file reference in header_php.php

Huh? You realize you are messing in the code when you can use the template and language file overrides?

14 Mar 2010, 7:41 PM
#16
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

Re: update button on shopping cart page has been disabled

I don't see how the language file overrides will work. Changing the definition of BUTTON_IMAGE_UPDATE won't help if the code uses ICON_IMAGE_UPDATE instead. And, since ICON_IMAGE_UPDATE is used for both the line-item update and the cart update, I can't change that, either.

As for the template file, I believe the relevant code is in tpl_shopping_cart_default.php:

<?php
  if ($product['buttonUpdate'] == '') {
    echo '' ;
  } else {
    echo $product['buttonUpdate'];
  }
?>

I don't know what I can do to this to achieve the desired results.

I don't wish to be playing with core code, but I can't see an alternative for this one. Please tell me if I'm missing something.

Thanks.

14 Mar 2010, 9:34 PM
#17
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,621
Plugin Contributions:
0

Re: update button on shopping cart page has been disabled

You really should just use one or the other of the update buttons ... turn the one you don't want off in the Admin.

14 Mar 2010, 10:28 PM
#18
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

Re: update button on shopping cart page has been disabled

In Admin? I wasn't aware that was an option. Where in Admin?

14 Mar 2010, 10:39 PM
#19
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,621
Plugin Contributions:
0

Re: update button on shopping cart page has been disabled

Admin> Configuration> Stock

(yes, we know that is a bad place for it - it will be fixed in the future)

14 Mar 2010, 10:48 PM
#20
mzimmers avatar

mzimmers

Zen Follower

Join Date:
May 2008
Posts:
453
Plugin Contributions:
0

Re: update button on shopping cart page has been disabled

Oh, I misunderstood your earlier post. But, that's a handy thing to know about.

As I believe I stated above, this was primarily for my personal education. My shop is going to contain only one-of-a-kind items, so it would be cool if I could eliminate the option to update quantity altogether (except for the delete button, of course). Is this possible?

Thanks, Kim.