Zen Follower
- Join Date:
- Mar 2004
- Location:
- Finland
- Posts:
- 435
- Plugin Contributions:
- 1
[Done] Shopping cart doesn't update quantitys with certain admin settings
Zencart version 1.3.8a
If you set in the admin so that the shopping cart product list doesn't show the update button per row, you can't update the cart quantity or delete products with the delete checkbox.
This is because the product id parameter is passed to the HTML via the $buttonUpdate variable shown below:
$buttonUpdate = ((SHOW_SHOPPING_CART_UPDATE == 1 or SHOW_SHOPPING_CART_UPDATE == 3) ? zen_image_submit(ICON_IMAGE_UPDATE, ICON_UPDATE_ALT) : '') . zen_draw_hidden_field('products_id[]', $products[$i]['id']);
so when you disable the button, it also disables the product id per row, and thus the cart won't update.
To fix this, I had to add the zen_draw_hidden_field('products_id[]', $products[$i]['id']); code with the quantity field:
$quantityField = zen_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"') . zen_draw_hidden_field('products_id[]', $products[$i]['id']);
File edited: includes/modules/pages/shopping_cart/header_php.php
Cheers,
Pasi
Working with Zen Cart since 2003 :: www.prr.fi
Author of the original Finnish language pack for Zen Cart since 2004