Zen Cart Logo
Forums / General Questions / Price by Attribute in Grid Pricing

Price by Attribute in Grid Pricing

Views: 698

Results 1 to 3 of 3
12 Nov 2015, 1:28 AM
#1
ronaldlb avatar

ronaldlb

New Zenner

Join Date:
Nov 2010
Posts:
42
Plugin Contributions:
0

Price by Attribute in Grid Pricing

Hi Everyone,

I need help please I have a product set to product price by attribute and the attribute is in grid pricing.

Now every time I try to add the product from the grid in the cart it show $0.00 it is picking up the qty pricing which was set to $0.0 for product by attribute to take place.

I have looked every where and I cannot seem to fix the problem please anyone can help.:frusty:

12 Nov 2015, 2:41 AM
#2
ronaldlb avatar

ronaldlb

New Zenner

Join Date:
Nov 2010
Posts:
42
Plugin Contributions:
0

Re: Price by Attribute in Grid Pricing

ronaldlb:

Hi Everyone,

I need help please I have a product set to product price by attribute and the attribute is in grid pricing.

Now every time I try to add the product from the grid in the cart it show $0.00 it is picking up the qty pricing which was set to $0.0 for product by attribute to take place.

I have looked every where and I cannot seem to fix the problem please anyone can help.:frusty:

I got it fixed by doing this help from :

https://www.zen-cart.com/showthread.php?85649-Product-Attribute-Grid/page40

OK, I fixed it! They seem to have forgotten that one of their "unneccessary" files was actually neccessary! For anyone with version 1.5.1., wanting to use this module, in order for your attribute stock to show up on the cart, please check the previous version's tpl_product_info_display.php. Under the section "Add to cart", there is a piece of code missing which will allow the attributes to be sent to the cart.

Replace:

<!--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-->

with:

<!--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); } if (isset($attrib_grid)) { $the_button = 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-->

And it adds the attributes to the cart!

12 Nov 2015, 3:30 PM
#3
ajeh avatar

ajeh

Oba-san

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

Re: Price by Attribute in Grid Pricing

Your changes have things goobered up ...

What was the "goal" of your changes that you want to accomplish?

I would start with putting back the original file so we can see how things look and then explain what changes you are hoping to accomplish ...