Guest Posted October 17, 2008 Posted October 17, 2008 My shopping cart is totaling items in thousands $$$??? To see what I mean, go to this page and add 1 item to the cart: http://bellafavori.com/store/product_info....products_id=617 This is happening with anything I add to the cart, with no rhyme or reason to how much is being charged. The only thing I've done is add the Simple Price Break contribution, and also the quantity box per the instructions on the site (here). Does anyone have any ideas as to what could be wrong & what I need to fix? I'm clueless. I'd appreciate any help very much.
FIMBLE Posted October 17, 2008 Posted October 17, 2008 It adds the item number as the cart qty! Check your install of the add ons again, on a separate note you might also want to use my update on the j query lightbox you have there, i released an update for it. Sometimes you're the dog and sometimes the lamp post [/url] My Contributions
Guest Posted October 17, 2008 Posted October 17, 2008 It adds the item number as the cart qty!Check your install of the add ons again, on a separate note you might also want to use my update on the j query lightbox you have there, i released an update for it. Is that what it's doing, I didn't even realize! :blink: I hope I can find what's wrong. Should I assume that it's in the shopping cart add on and it's NOT a database error??? I did look through the changed pages last night & couldn't find something that looked "wrong". I will ck the update for lightbox, thanks.
Guest Posted October 18, 2008 Posted October 18, 2008 Could I have done something wrong here: http://www.oscommerce.com/forums/index.php?s=&...t&p=1322892 I'm not too savvy with MySQL and not sure I did that right or not...maybe that's what wrong.
Guest Posted October 18, 2008 Posted October 18, 2008 Ok, Anyone Please - I think I'm on to something here, if someone could just point me in the direction I need to go now I would be forever grateful. If you add something to the shopping cart from the product listing page, it's ok. The weirdness occurs when something is added directly from the product info page itself. I'm not sure if I should be looking for an error in store/product_info.php or includes/languages/english/product_info.php??? This is the latter, the last 4 lines are what was added for the SPB add on, is there something wrong there: <?php /* $Id: product_info.php,v 1.15 2002/11/19 01:48:08 dgw_ Exp $ osCommerce, Open Source E-Commerce Solutions [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url] Copyright © 2002 osCommerce Released under the GNU General Public License */ define('TEXT_PRODUCT_NOT_FOUND', 'Product not found!'); define('TEXT_CURRENT_REVIEWS', 'Current Reviews:'); define('TEXT_MORE_INFORMATION', 'For more information, please visit this products <a href="%s" target="_blank"><u>webpage</u></a>.'); define('TEXT_DATE_ADDED', 'This product was added to our catalog on %s.'); define('TEXT_DATE_AVAILABLE', '<font color="#ff0000">This product will be in stock on %s.</font>'); define('TEXT_ALSO_PURCHASED_PRODUCTS', 'Customers who bought this product also purchased'); define('TEXT_PRODUCT_OPTIONS', 'Available Options:'); define('TEXT_CLICK_TO_ENLARGE', 'Click to enlarge'); define('TEXT_HEAD_REDUC_QTY', 'Prices per Quantity'); define('TEXT_QTY_PRIX_FIRST', 'Up to %u'); define('TEXT_QTY_PRIX', 'From %u to %u'); define('TEXT_QTY_PRIX_LAST', '%u and more'); ?> Please, I'm begging for help!!!
Guest Posted October 18, 2008 Posted October 18, 2008 Please disregard the previous post, sorry. After a couple of hours of shut eye I realize the error can't be in that code because I uninstalled that add on and still had the error :angry: What in the world can be wrong? Where to look to find an error that makes the price wrong from only the product page itself, not from the product listing???? And what am I looking for, I don't even know :( I never had an error with my shopping cart prior to installing this add on, which I have removed from my pages (but not from MySQL if that means anything). I couldn't get it to work, so I had to uninstall.
♥Vger Posted October 18, 2008 Posted October 18, 2008 The best thing for you to do is to look in your website's error_log. It should be available to download from your web hosting control panel even if it's not accessible to you via FTP. Vger
Guest Posted October 18, 2008 Posted October 18, 2008 Hi can you post your : \catalog\includes\classes\shopping_cart.php
Guest Posted October 18, 2008 Posted October 18, 2008 The best thing for you to do is to look in your website's error_log. It should be available to download from your web hosting control panel even if it's not accessible to you via FTP. Vger I'll look for it...thank you. I'm not sure I'll recognize the error if I see it though.
Guest Posted October 18, 2008 Posted October 18, 2008 hi this look like the prob: you have this <td class="main" align="CENTER"><B>ENTER QUANTITY</B> <input type="text" name="quantity" value="" maxlength="4" size="4"> <?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td> and QPB needs this: <?php // BOF qpbpp //<td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?> <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> </td> <?php // EOF qpbpp ?> I now you have a diff look to your page but the code still need to be right
Guest Posted October 18, 2008 Posted October 18, 2008 hi this look like the prob: you have this <td class="main" align="CENTER"><B>ENTER QUANTITY</B> <input type="text" name="quantity" value="" maxlength="4" size="4"> <?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td> and QPB needs this: <?php // BOF qpbpp //<td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?> <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> </td> <?php // EOF qpbpp ?> I now you have a diff look to your page but the code still need to be right the above is wrong by me sorry
Guest Posted October 18, 2008 Posted October 18, 2008 hi this look like the prob: you have this /catalog/includes/classes/shopping_cart.php BEGIN Changes ---------------- find (l276) (inside calculate()) : $products_price = $products['products_price']; add after : if( isset($product['products_discount']) && strlen($product['products_discount'])>2 ) { if( $tranche = explode( ',', $product['products_discount'] ) ) { $products_price_tmp = $products_price; foreach( $tranche as $cle => $trn ) if( $qty_px = explode( ':', $trn ) ) { if( $this->contents[$products_id]['qty'] >= $qty_px[0] ) { if( strstr($qty_px[1],'%') ) $products_price_tmp = $products_price * (1-($qty_px[1]/100)); else $products_price_tmp = $qty_px[1]; } } $products_price = $products_price_tmp; } } ---------------- find (l281) : $products_price = $specials['specials_new_products_price']; replace with : if( $products_price > $specials['specials_new_products_price'] ) $products_price = $specials['specials_new_products_price']; ---------------- find (l273) $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$products_id . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); replace with : $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_model, p.products_image, p.products_price, p.products_discount, p.products_weight, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$products_id . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); ---------------- find (l223) : $products_price = $specials['specials_new_products_price']; replace with : if( $products_price > $specials['specials_new_products_price'] ) $products_price = $specials['specials_new_products_price']; ---------------- find (l216) (inside get_products()): $products_price = $product['products_price']; add after : if( isset($products['products_discount']) && strlen($products['products_discount'])>2 ) { if( $tranche = explode( ',', $products['products_discount'] ) ) { $products_price_tmp = $products_price; foreach( $tranche as $cle => $trn ) if( $qty_px = explode( ':', $trn ) ) { if( $this->contents[$products_id]['qty'] >= $qty_px[0] ) { if( strstr($qty_px[1],'%') ) $products_price_tmp = $products_price * (1-($qty_px[1]/100)); else $products_price_tmp = $qty_px[1]; } } $products_price = $products_price_tmp; } } ---------------- find (l213) : $product_query = tep_db_query("select products_id, products_price, products_tax_class_id, products_weight from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); replace with : $product_query = tep_db_query("select products_id, products_price, products_discount, products_tax_class_id, products_weight from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); ---------------- END Changes /catalog/includes/classes/shopping_cart.php --------------------------------------------------------- Other changes are to /catalog/product_info.php; /catalog/product_info.php; /catalog/admin /categories.php and /catalog/includes/languages/english/product_info.php
Guest Posted October 20, 2008 Posted October 20, 2008 I just wanted to post that this problem has been SOLVED, by Simon (West One Hosting). It turns out that I used a bit of code from the Knowledge Base to create a quantity box on my product page - not realizing that the Knowledge Base contains code for the NEXT VERSION of OSC. Duh, how are we regular people supposed to know this???? Thank Goodness for Simon or I don't know what I would do. Probably have to start my store all over again! Thank You Again, Simon. You are Da Best in my book!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.