Quantity Price Breaks
#1
Posted 01 August 2006 - 12:35 PM
I've just been having a hard time with this, and e-mailing people on here, I don't know anyone who's gotten a version to work yet. Any advice would be greatly appreciated!
J
Simple 1-2-3 Intructions on how to get, install and configure SSL
The Google Sandbox explained
Simple to follow instructions on how to change the look of your OSC
How To Make A Horrible OSC Website
my toolbox: PHP Designer 2007 - Winmerge - phpMyAdmin - WS_FTP - Photoshop - Paint Shop Pro - Crimson Editor
my installed contributions: Category Banners, File Upload feature-.77, Header Tags, Sort_Product_Attributes_1, XSellv2.3, Price Break 1.11.2, wishlist 3.5, rollover_category_images_v1.2, Short_Description_v2.1, UPSXML_v1_2_3, quickbooks qbi_v2_10, allprods v4.4, Mouseover-effect for image-buttons 1.0, Ultimate_SEO, AAP 1.41, Auto Select State Value, Fast Easy Checkout, Dynamic SiteMap v2.0, Image Magic, Links Manager 1.14, Featured Products, Customer Testimonials, Article Manager, FAQ System, and I'm sure more ...
#2 ONLINE
Posted 01 August 2006 - 08:24 PM
jpweber, on Aug 1 2006, 02:35 PM, said:
#3
Posted 01 August 2006 - 09:45 PM
Price=$199
So ... quantity blocks: 1
price break level 1: $169 Qty: 3
When I go to that product's page, however, http://www.thevisiondepot.com/catalog/prod...54c0b10447642d4 .... well, I don't see a price quantity break. Maybe I have to type it in there manually?
Also, I can't add more than 2 things to my cart right nwo. If I try to add 3 things, well, it won't accept. Ugh! Well, thank you for pointing me in the right direction. I think I'll get there. I'll just google search and search the forums here. But if you have any suggestions, I'd be more than willing to listen. Thanks a lot Jan,
Jason
Simple 1-2-3 Intructions on how to get, install and configure SSL
The Google Sandbox explained
Simple to follow instructions on how to change the look of your OSC
How To Make A Horrible OSC Website
my toolbox: PHP Designer 2007 - Winmerge - phpMyAdmin - WS_FTP - Photoshop - Paint Shop Pro - Crimson Editor
my installed contributions: Category Banners, File Upload feature-.77, Header Tags, Sort_Product_Attributes_1, XSellv2.3, Price Break 1.11.2, wishlist 3.5, rollover_category_images_v1.2, Short_Description_v2.1, UPSXML_v1_2_3, quickbooks qbi_v2_10, allprods v4.4, Mouseover-effect for image-buttons 1.0, Ultimate_SEO, AAP 1.41, Auto Select State Value, Fast Easy Checkout, Dynamic SiteMap v2.0, Image Magic, Links Manager 1.14, Featured Products, Customer Testimonials, Article Manager, FAQ System, and I'm sure more ...
#4 ONLINE
Posted 01 August 2006 - 10:00 PM
jpweber, on Aug 1 2006, 11:45 PM, said:
Price=$199
So ... quantity blocks: 1
price break level 1: $169 Qty: 3
When I go to that product's page, however, http://www.thevisiondepot.com/catalog/prod...54c0b10447642d4 .... well, I don't see a price quantity break. Maybe I have to type it in there manually?
<td class="main" align="right"><input type="hidden" name="products_id" value="30"><input type="image" src="includes/languages/english/images/buttons/button_in_cart.gif" border="0" alt="Add to Cart" title=" Add to Cart "></td>However I would expect to something like this:
<td class="main" align="right"> <table border="0" align="right"> <tr><td align="center"> Quantity:<input type="text" name="cart_quantity" value="1" size="6"> </td></tr> <tr><td align="center"> <input type="hidden" name="products_id" value="5"><input type="image" src="includes/languages/english/images/buttons/button_in_cart.gif" border="0" alt="Add to Cart" title=" Add to Cart "> </td></tr>The field "cart_quantity" is used in application_top.php when adding a product to the cart. If you don't want an input field, at least make it a hidden filed with a value of 1.
Quote
#5
Posted 01 August 2006 - 10:16 PM
http://www.thevisiondepot.com/catalog/prod...54c0b10447642d4
Thank you so much for bearing with me, Jan. I hope this finally did it!
Jason
Simple 1-2-3 Intructions on how to get, install and configure SSL
The Google Sandbox explained
Simple to follow instructions on how to change the look of your OSC
How To Make A Horrible OSC Website
my toolbox: PHP Designer 2007 - Winmerge - phpMyAdmin - WS_FTP - Photoshop - Paint Shop Pro - Crimson Editor
my installed contributions: Category Banners, File Upload feature-.77, Header Tags, Sort_Product_Attributes_1, XSellv2.3, Price Break 1.11.2, wishlist 3.5, rollover_category_images_v1.2, Short_Description_v2.1, UPSXML_v1_2_3, quickbooks qbi_v2_10, allprods v4.4, Mouseover-effect for image-buttons 1.0, Ultimate_SEO, AAP 1.41, Auto Select State Value, Fast Easy Checkout, Dynamic SiteMap v2.0, Image Magic, Links Manager 1.14, Featured Products, Customer Testimonials, Article Manager, FAQ System, and I'm sure more ...
#6 ONLINE
#7
Posted 02 August 2006 - 02:14 PM
J
Simple 1-2-3 Intructions on how to get, install and configure SSL
The Google Sandbox explained
Simple to follow instructions on how to change the look of your OSC
How To Make A Horrible OSC Website
my toolbox: PHP Designer 2007 - Winmerge - phpMyAdmin - WS_FTP - Photoshop - Paint Shop Pro - Crimson Editor
my installed contributions: Category Banners, File Upload feature-.77, Header Tags, Sort_Product_Attributes_1, XSellv2.3, Price Break 1.11.2, wishlist 3.5, rollover_category_images_v1.2, Short_Description_v2.1, UPSXML_v1_2_3, quickbooks qbi_v2_10, allprods v4.4, Mouseover-effect for image-buttons 1.0, Ultimate_SEO, AAP 1.41, Auto Select State Value, Fast Easy Checkout, Dynamic SiteMap v2.0, Image Magic, Links Manager 1.14, Featured Products, Customer Testimonials, Article Manager, FAQ System, and I'm sure more ...
#8
Posted 02 August 2006 - 06:51 PM
However, If I change the Quantity in the shopping cart, no problem. Just from when the cart is reading the quantity from product_info.php...
Did I do Somethign Wrong or miss a line or something? (Downloaded version 1.11.2 modified files pack, and Full pkg, with copy of modified files, complete Jemlin1)
-Thanks
DemonAngel
Edited by demonangel, 02 August 2006 - 06:54 PM.
#9
Posted 02 August 2006 - 06:54 PM
demonangel, on Aug 2 2006, 02:51 PM, said:
Anybody fix this?
-Thanks
DemonAngel
Can you paste the snippet of code we're talking about here? I'll compare it to mine and see if I can help.
J
Simple 1-2-3 Intructions on how to get, install and configure SSL
The Google Sandbox explained
Simple to follow instructions on how to change the look of your OSC
How To Make A Horrible OSC Website
my toolbox: PHP Designer 2007 - Winmerge - phpMyAdmin - WS_FTP - Photoshop - Paint Shop Pro - Crimson Editor
my installed contributions: Category Banners, File Upload feature-.77, Header Tags, Sort_Product_Attributes_1, XSellv2.3, Price Break 1.11.2, wishlist 3.5, rollover_category_images_v1.2, Short_Description_v2.1, UPSXML_v1_2_3, quickbooks qbi_v2_10, allprods v4.4, Mouseover-effect for image-buttons 1.0, Ultimate_SEO, AAP 1.41, Auto Select State Value, Fast Easy Checkout, Dynamic SiteMap v2.0, Image Magic, Links Manager 1.14, Featured Products, Customer Testimonials, Article Manager, FAQ System, and I'm sure more ...
#10
Posted 02 August 2006 - 07:27 PM
<td class="main" align="right">
<table border="0" align="right">
<tr><td align="center">
<?php echo TEXT_ENTER_QUANTITY . ":" . tep_draw_input_field('cart_quantity', $pf->adjustQty(1), 'size="6"'); ?>
</td></tr>
<tr><td align="center">
<?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?>
</td></tr>
</table>
When I change the quantity here, it only says '1' in the shopping cart.
#11
Posted 02 August 2006 - 07:31 PM
<td class="main" align="right">
<table border="0" align="right">
<tr><td align="center">
<?php echo TEXT_ENTER_QUANTITY . ":" . tep_draw_input_field('cart_quantity', $pf->adjustQty(1), 'size="6"'); ?>
</td></tr>
<tr><td align="center">
<?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?>
</td></tr>
</table>
J
Simple 1-2-3 Intructions on how to get, install and configure SSL
The Google Sandbox explained
Simple to follow instructions on how to change the look of your OSC
How To Make A Horrible OSC Website
my toolbox: PHP Designer 2007 - Winmerge - phpMyAdmin - WS_FTP - Photoshop - Paint Shop Pro - Crimson Editor
my installed contributions: Category Banners, File Upload feature-.77, Header Tags, Sort_Product_Attributes_1, XSellv2.3, Price Break 1.11.2, wishlist 3.5, rollover_category_images_v1.2, Short_Description_v2.1, UPSXML_v1_2_3, quickbooks qbi_v2_10, allprods v4.4, Mouseover-effect for image-buttons 1.0, Ultimate_SEO, AAP 1.41, Auto Select State Value, Fast Easy Checkout, Dynamic SiteMap v2.0, Image Magic, Links Manager 1.14, Featured Products, Customer Testimonials, Article Manager, FAQ System, and I'm sure more ...
#12 ONLINE
Posted 02 August 2006 - 07:32 PM
demonangel, on Aug 2 2006, 08:51 PM, said:
However, If I change the Quantity in the shopping cart, no problem. Just from when the cart is reading the quantity from product_info.php...
File to be altered: catalog/includes/application_top.php ============================================================ Find: // include currencies class and create an instance require(DIR_WS_CLASSES . 'currencies.php'); $currencies = new currencies(); Add after the above: // include the price formatter for the price breaks contribution require(DIR_WS_CLASSES . 'PriceFormatter.php'); $pf = new PriceFormatter; ============================================================ Find: $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']); Change to: $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id'])) + $HTTP_POST_VARS['cart_quantity'], $HTTP_POST_VARS['id']);
#13
Posted 02 August 2006 - 07:36 PM
I tried your Snipplet, same thing, but I am gonna try using the snippet from the product_listing.php file and ssee what happens...
#14
Posted 02 August 2006 - 07:44 PM
This is really getting to me cause, from the product listing, no prob, quantities are correct, it is only from the products_info.php page....hmmm.
It could be my code for all I know. But I'll double check, it is possible i over looked something...
#15
Posted 02 August 2006 - 07:49 PM
$cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);
My Line looks like:
//$cart->add_cart($products_id, $cart->get_quantity(tep_get_uprid($products_id, $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id'],true,array(),0);
So ha ha! It worked. Sorry for bogging everyone down with my probs and that to Jan and JP for thier help!
#16
Posted 02 August 2006 - 07:58 PM
J
Simple 1-2-3 Intructions on how to get, install and configure SSL
The Google Sandbox explained
Simple to follow instructions on how to change the look of your OSC
How To Make A Horrible OSC Website
my toolbox: PHP Designer 2007 - Winmerge - phpMyAdmin - WS_FTP - Photoshop - Paint Shop Pro - Crimson Editor
my installed contributions: Category Banners, File Upload feature-.77, Header Tags, Sort_Product_Attributes_1, XSellv2.3, Price Break 1.11.2, wishlist 3.5, rollover_category_images_v1.2, Short_Description_v2.1, UPSXML_v1_2_3, quickbooks qbi_v2_10, allprods v4.4, Mouseover-effect for image-buttons 1.0, Ultimate_SEO, AAP 1.41, Auto Select State Value, Fast Easy Checkout, Dynamic SiteMap v2.0, Image Magic, Links Manager 1.14, Featured Products, Customer Testimonials, Article Manager, FAQ System, and I'm sure more ...
#17
Posted 03 August 2006 - 03:58 PM
Just asking, cause I didn't see anyhting in the documentation regarding it...
#18
Posted 03 August 2006 - 04:18 PM
This is a code snipplet I put together for a switch of the discounts table:
(This example ius taken from my Clients' site which only has 5 level of discount...you can copy & paste the <TR> from level 5 on for the additional discounts...
essentially if the product has discounts, the table will show, if not, a nice message appears...
THE CODE:
<?php if ($product_info['products_price1'] == '0.0000'){
echo '<tr><td colspan="3"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="3" bgcolor="#D9CFAB" align="center"><span class="style1">'. $product_info['products_name'].' does not have quantity discounts.</span></td>
</tr>
</table>';
}else{
?>
<tr>
<td colspan="3" >
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="3" bgcolor="#D9CFAB"><span class="style1">Quantity Discounts by Case </span></td>
</tr>
<tr>
<td colspan="3" ><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="47%" bgcolor="823b3b" class="style1"><span class="style2">Case Quantity: </span></td>
<td width="3%" bgcolor="823b3b" class="style2"> </td>
<td width="50%" align="right" valign="top" bgcolor="823b3b" class="style1"><span class="style2">Price:</span></td>
</tr>
<tr>
<td><span class="style1">2-4 Cases: </span></td>
<td> </td>
<td align="right" valign="top"><?php //echo $product_info['products_price1'];
echo $currencies->display_price($product_info['products_price1'], tep_get_tax_rate($product_info['products_tax_class_id']))?></td>
</tr>
<tr>
<td><span class="style1">5-9 Cases: </span></td>
<td> </td>
<td align="right" valign="top"><?php //echo $product_info['products_price2'];
echo $currencies->display_price($product_info['products_price2'], tep_get_tax_rate($product_info['products_tax_class_id']))?></td>
</tr>
<tr>
<td><span class="style1">10-14 Cases: </span></td>
<td> </td>
<td align="right" valign="top"><?php //echo $product_info['products_price3'];
echo $currencies->display_price($product_info['products_price3'], tep_get_tax_rate($product_info['products_tax_class_id']))?></td>
</tr>
<tr>
<td><span class="style1">15-19 Cases: </span></td>
<td> </td>
<td align="right" valign="top"><?php //echo $product_info['products_price4'];
echo $currencies->display_price($product_info['products_price4'], tep_get_tax_rate($product_info['products_tax_class_id']))?></td>
</tr>
<tr>
<td bgcolor="#ECE9D8"><span class="style1">20 Cases or More: </span></td>
<td bgcolor="#ECE9D8"> </td>
<td align="right" valign="top" bgcolor="#ECE9D8"><?php //echo $product_info['products_price5'];
echo $currencies->display_price($product_info['products_price5'], tep_get_tax_rate($product_info['products_tax_class_id']))?></td>
</tr>
</table></td>
</tr>
<?php }?>
END THE CODE
#19 ONLINE
#20
Posted 09 August 2006 - 03:26 AM
I get the error message when I go to a specific item in my category "1054 - Unknown column 'p.products_id' in 'on clause'" This problem only occured after applying the package.
I did read in the forums about the SQL 5 compatiablity bug -- and downloaded the patch to fix it, however, I am still getting the same error message. I am running Windows 2000 , with mySQL 5 (community edition) and PHP 5.1.4.
Recently, I have been told that the SQL 5 bug fix is only suitable for Unix/Linux servers -- can anyone please help modify the SQL 5 bug fix code for a Windows server user?
Any help in this matter would be highly appreciated.
Thanks in advance!









