Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Quantity Box on product_info.php ALONG WITH awb price break


Guest

Recommended Posts

I want to have a quantity box on the product_info page - easy. I have found all the posts on it, and my input box is there. The problem is that the quantity is not being update, because I am also using the Price Break contribution and it has altered my code in application_top.php

 

This is my applicatoin_top.php

 

      case 'add_product' :    if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {

                               // AWB+ PRICE-BREAK

                               $cart->add_cart($HTTP_POST_VARS['products_id'], 

                                          $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))

                                               + awb_pb_get_qty_blocks($HTTP_POST_VARS['products_id']), $HTTP_POST_VARS['id']);

                               // AWB- PRICE-BREAK

                             }

                             tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));

                             break;

 

Now I know I have to add + $quantity in there somewhere. I feel like I have tried adding it everywhere. I have even tried passing it to the various functions, and even that isn't working.

 

Has anyone come across this before? Can someone PLEASE give me some suggestions? Thanks.

Link to comment
Share on other sites

In application_top you need to find this piece of code and add the +$quantity in as shown

 

      case 'add_product' :    if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {

                               $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+$quantity, $HTTP_POST_VARS['id']);

                             }

                             tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));

                             break;

 

this should fix it for you

Reddy to Rumble

 

Thank you osCommerce and all who Contribute to her!

Link to comment
Share on other sites

I have the price break module installed - therefore I NEED TO HAVE THIS

 

 + awb_pb_get_qty_blocks($HTTP_POST_VARS['products_id'])

 

added in there. Refer to my first post for the full code set.

 

Thanks for the help though.

Link to comment
Share on other sites

Yes, - if a quantity block is specified - then the customer is forced to purchase it by that amount.

 

So - I want to take the quantity they typed in the box - compare it to the quantity block (if there is one) and adjust it accordingly. And it doesn't seem like I can do that by simply adding + $quantity in there somewhere.

Link to comment
Share on other sites

  • 1 month later...

I have had the qty boxes on the product_info page for months. I am now adding the AWB mod for 2.2 CVS and I cannot get the prod_info page to accept more than 1 for quantity.

 

I have changed things in the application_top and the product_info pages to not reference the block quantity since I don't need that. However it still doesn't work right.

 

Please help.

 

Thanks.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...