Zen Cart Logo
Forums / Basic Configuration / product quantities not passed

product quantities not passed

Locked

Views: 1,248

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
3 May 2008, 12:08 PM
#1
dannyd avatar

dannyd

Zen Follower

Join Date:
Apr 2005
Posts:
191
Plugin Contributions:
0

product quantities not passed

Product quantities arent passed within my site https://www.sndonline.net. If you add a quanitity to a product then add to cart the quantity gets defaulted back to 1 in the shopping cart. How can I fix this ?

3 May 2008, 12:22 PM
#2
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: product quantities not passed

I only experience the problem with the duplicate button which you've hacked. It looks as if its quantity variable isn't independent from the original. Perhaps you could post the edited code.

3 May 2008, 1:17 PM
#3
dannyd avatar

dannyd

Zen Follower

Join Date:
Apr 2005
Posts:
191
Plugin Contributions:
0

Re: product quantities not passed

I did hack the page just to move the add to cart box as per below. But when I move it .. it doesnt work properly and the quantities arent passed. How can I move the add to cart box to the top and have it working properly. Can find any helpful posts.

Thanks.

<!--bof Add to Cart Box --> <?php if (CUSTOMERS_APPROVAL == 3 and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') { // do nothing } else { ?>
        <?php
$display_qty = (($flag_show_product_info_in_cart_qty == 1 and $_SESSION['cart']->in_cart($_GET['products_id'])) ? '<p>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $_SESSION['cart']->get_quantity($_GET['products_id']) . '</p>' : '');
        if ($products_qty_box_status == 0 or $products_quantity_order_max== 1) {
          // hide the quantity box and default to 1
          $the_button = '<input type="hidden" name="cart_quantity" value="1" />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
        } else {
          // show the quantity box
$the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '<br />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
        }
$display_button = zen_get_buy_now_button($_GET['products_id'], $the_button);

?>

<?php if ($display_qty != '' or $display_button != '') { ?>
<div id="cartAdd">
<?php
  echo $display_qty;
  echo $display_button;
        ?>
      </div>
<?php } // display qty and button ?> <?php } // CUSTOMERS_APPROVAL == 3 ?> <!--eof Add to Cart Box-->
3 May 2008, 2:03 PM
#4
dannyd avatar

dannyd

Zen Follower

Join Date:
Apr 2005
Posts:
191
Plugin Contributions:
0

Re: product quantities not passed

is this not possible. I've searched these forums for a way to move the add to cart box .. but nothing.

3 May 2008, 2:08 PM
#5
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
1

Re: product quantities not passed

By move, I assume you mean copy.

The problem is that whatever the last quantity field is, it will supersede any earlier ones.

I'm not sure at the moment how to work around this. It would probably involve giving the two sets of components different variables to each other, and then making sure the shopping cart page is able to read them all.

http://www.zen-cart.com/forum/showthread.php?t=92878