Silverado05 Posted June 29, 2007 Share Posted June 29, 2007 This is currently where I am at. The code below is what I am using as of right now. The problem with the code is for example if you want to add 3 to the quantity then hit add to cart it would only add 1 and thier is more then 3 in stock so it's not from that. I had it fix to where it would add to the cart what you put in the qty box but then when you went to add to cart it would send it to a page in the pic above that says product not found but would add it to cart. So can anyone help me out with the code to why it won't add more then one to the cart using the qty box? CODE case 'PRODUCT_LIST_BUY_NOW': $lc_align = 'center'; $lc_text = tep_draw_form('buy_now' . $listing['products_id'], tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']), 'POST') . tep_draw_input_field('list_quantity', '1', 'size=2'). ' ' . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART, 'align=absmiddle') . '</form> '; break; } OR I can use this code and fix the qty box to where it will add the right qty to the box BUT when you hit add to cart it will display a page that says "Product not found" but it adds it to the cart And here is the code for that CODE case 'PRODUCT_LIST_BUY_NOW': $lc_align = 'center'; $lc_text = '<form name="cart_quantity" method="post" action="' . tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product', 'NONSSL'). '"><input type="hidden" name="products_id" value="' . $listing['products_id'] . '"><input type="text" name="quantity" value="1" maxlength="2" size="2">' . ' ' . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART, 'align=absmiddle') . '</form>'; break; } So if anyone can help me fix ether one of these bits of code to get it to work that would be GREAT!!! -THANKS Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works. Link to comment Share on other sites More sharing options...
Iggy Posted June 29, 2007 Share Posted June 29, 2007 Can you give links to particular contrib(s) your using? Iggy Everything's funny but nothing's a joke... Link to comment Share on other sites More sharing options...
Silverado05 Posted June 29, 2007 Author Share Posted June 29, 2007 Do you want the links for all the contributions I am using or just for the qty boxes? I have probably about 50 or so contributions installed and the only problem I am having is with these stupid qty boxes. I can get the qty boxes to work and add the correct qty but when you hit add to cart it takes you to a page that says product not found but adds it to the cart. See screenshot above. the other code will fix that but the qty boxes won't add the correct qty to the cart. Both codes are above. I might need to add this is only happening on the product_listing.php and not the product info as the description describes, that's another issue that is really weird. -Thanks Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works. Link to comment Share on other sites More sharing options...
Iggy Posted June 29, 2007 Share Posted June 29, 2007 Do you want the links for all the contributions I am using or just for the qty boxes? I have probably about 50 or so contributions installed and the only problem I am having is with these stupid qty boxes. I can get the qty boxes to work and add the correct qty but when you hit add to cart it takes you to a page that says product not found but adds it to the cart. See screenshot above. the other code will fix that but the qty boxes won't add the correct qty to the cart. Both codes are above. I might need to add this is only happening on the product_listing.php and not the product info as the description describes, that's another issue that is really weird. -Thanks Start off with just the quantity box contrib. With 50 some odd contribs there could be any number of things happening. I'm thinking to confirm it works on a stock osC and you can compare from there. Have you tried it on a stock osC? I'm in the slow and steady wins the race camp which basically means rip it down to 0 and build till you find the error if you can't suss it on the 1st or second or 20th try. Iggy Everything's funny but nothing's a joke... Link to comment Share on other sites More sharing options...
Iggy Posted June 29, 2007 Share Posted June 29, 2007 Do you want the links for all the contributions I am using or just for the qty boxes?-Thanks Come to think of it if you can list all your mods and versions that might be enlightening as well. Iggy Everything's funny but nothing's a joke... Link to comment Share on other sites More sharing options...
Silverado05 Posted June 29, 2007 Author Share Posted June 29, 2007 Ok after you asked me to give you the link to the contribution I used. I had to go searching for it because I didn't save it since it didn't have any files to save. During my search I came across some updated code that I was able to piece together and got that to work, so thank you for your time. Now if I had to take the time to list all my contributions I might be here awhile...LoL Ok here is my next issue which is kind of related as it has to do with the qty boxes just on my product info page. Ok above the product description I have an add to cart button with a qty box next to it and I have the same thing at the bottom of the page also in case the description is long it will save the customer time from having to scroll all the way back up if they want to purchase it. Anyways, I am using the EXACT same code for both buttons and qty boxes. Now the qty boxes at the top work fawlessly, but the qty boxes at the bottom will not add more then 1 product at a time. I.E. If i wanted to add 3 it would only add 1. What's weird is the code from the top and bottom are exactly the same. I have posted the snippets for the code from the file below if anyone can see anything. -Thanks Top qty box and button that work <td class="main" align="right" valign="bottom"><?php echo TEXT_QUANTITY . tep_draw_input_field('quantity', '1', 'SIZE=2 maxlength=2') . tep_draw_separator('pixel_trans.gif', '5', '1') . tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART, 'align=absmiddle'); ?></td> Bottom qty box and button that doesn't work <td class="main" align="right" valign="bottom"><?php echo TEXT_QUANTITY . tep_draw_input_field('quantity', '1', 'SIZE=2 maxlength=2') . tep_draw_separator('pixel_trans.gif', '5', '1') . tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART, 'align=absmiddle'); ?></td> -Thanks Again! Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works. Link to comment Share on other sites More sharing options...
Iggy Posted June 29, 2007 Share Posted June 29, 2007 Ok after you asked me to give you the link to the contribution I used. I had to go searching for it because I didn't save it since it didn't have any files to save. During my search I came across some updated code that I was able to piece together and got that to work, so thank you for your time. Now if I had to take the time to list all my contributions I might be here awhile...LoL Ok here is my next issue which is kind of related as it has to do with the qty boxes just on my product info page. Ok above the product description I have an add to cart button with a qty box next to it and I have the same thing at the bottom of the page also in case the description is long it will save the customer time from having to scroll all the way back up if they want to purchase it. Anyways, I am using the EXACT same code for both buttons and qty boxes. Now the qty boxes at the top work fawlessly, but the qty boxes at the bottom will not add more then 1 product at a time. I.E. If i wanted to add 3 it would only add 1. What's weird is the code from the top and bottom are exactly the same. I have posted the snippets for the code from the file below if anyone can see anything. -Thanks Top qty box and button that work <td class="main" align="right" valign="bottom"><?php echo TEXT_QUANTITY . tep_draw_input_field('quantity', '1', 'SIZE=2 maxlength=2') . tep_draw_separator('pixel_trans.gif', '5', '1') . tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART, 'align=absmiddle'); ?></td> Bottom qty box and button that doesn't work <td class="main" align="right" valign="bottom"><?php echo TEXT_QUANTITY . tep_draw_input_field('quantity', '1', 'SIZE=2 maxlength=2') . tep_draw_separator('pixel_trans.gif', '5', '1') . tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART, 'align=absmiddle'); ?></td> -Thanks Again! That's yet another one I don't know the answer to. Here's how I would approach it though. Set up a stock osC and add the code there. Get it working in the simplest configuration you can as that can be instructive. My guess is there's a <form></form> that needs to be addressed somewhere. But that's just a guess. Iggy Everything's funny but nothing's a joke... Link to comment Share on other sites More sharing options...
Silverado05 Posted June 29, 2007 Author Share Posted June 29, 2007 Well thank you for the effort I really appreicate it. What is really strange is the two codes are exactly the same and it works at the top of the page, just not at the bottom. I don't know if their is a conflict with the two qty codes being on the same page and listed twice or something. I am going to keep playing with it but in the meantime if anyone can see something in the code or knows why it isn't working please let me know. -Thanks Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works. Link to comment Share on other sites More sharing options...
Silverado05 Posted June 30, 2007 Author Share Posted June 30, 2007 Actually I am wrong above. The bottom code is the one that works instead of the top. So here is an update. I removed the bottom code so that I just had once qty and buy now button at the top. So I tried adding qty to the box at the top that didn't work since I removed the bottom code and it worked. So my problem lies with have duplicate code on the same page. So can anyone help me to where this will work having two sets of code on the same page? -Thanks Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works. Link to comment Share on other sites More sharing options...
Iggy Posted June 30, 2007 Share Posted June 30, 2007 Actually I am wrong above. The bottom code is the one that works instead of the top. So here is an update. I removed the bottom code so that I just had once qty and buy now button at the top. So I tried adding qty to the box at the top that didn't work since I removed the bottom code and it worked. So my problem lies with have duplicate code on the same page. So can anyone help me to where this will work having two sets of code on the same page? -Thanks Which contrib is it? Everything's funny but nothing's a joke... Link to comment Share on other sites More sharing options...
Silverado05 Posted June 30, 2007 Author Share Posted June 30, 2007 It is not a contribution. It is just code I have scraped together. It works, it just doesn't work when it is on the same page twice. So I need some coding help to figure out how I can have it on there twice without conflicts. -Thanks Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works. Link to comment Share on other sites More sharing options...
Iggy Posted June 30, 2007 Share Posted June 30, 2007 It is not a contribution. It is just code I have scraped together. It works, it just doesn't work when it is on the same page twice. So I need some coding help to figure out how I can have it on there twice without conflicts. -Thanks Post the whole page if you would. Everything's funny but nothing's a joke... Link to comment Share on other sites More sharing options...
Silverado05 Posted June 30, 2007 Author Share Posted June 30, 2007 Product_info.php <?php/* $Id: product_info.php,v 1.97 2003/07/01 14:34:54 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO); $product_auction_query = tep_db_query("select categories_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"); $auction_product_check = tep_db_fetch_array($product_auction_query); $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_check = tep_db_fetch_array($product_check_query); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <?php if ($auction_product_check['categories_id'] == '9999') { ?> <meta http-equiv="refresh" content="0; url=<?php echo FILENAME_AUCTION_PRODUCT_INFO . '?products_id=' . $HTTP_GET_VARS['products_id'] ?>"> <?php } ?> <?php # cDynamic Meta Tags /*<title><?php echo TITLE; ?>*/ require(DIR_WS_INCLUDES . 'meta_tags.php'); # ?> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> <script language="javascript"><!-- function popupWindow(url) { window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le ft=150') } function popupPricematch(url) { window.open(url,'popupPricematch','toolbar=no,status=no,location=no,directories=no,status=no,menubar=no,scrollb ars=yes,resizable=yes,copyhistory=no,width=500,height=250,screenX=100,screenY=150 ,top=10,left=150') } //--></script> <script LANGUAGE="JavaScript1.2" SRC="includes/menu_animation.js"></SCRIPT> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- coolMenu //--> <?php require(DIR_WS_INCLUDES . 'coolmenu.php'); ?> <!-- coolMenu_eof //--> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0"> <?php if ($product_check['total'] < 1) { ?> <tr> <td><?php new infoBox(array(array('text' => TEXT_PRODUCT_NOT_FOUND))); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <?php } else { if (!tep_session_is_registered('recently_viewed')) { tep_session_register('recently_viewed'); $recently_viewed = $HTTP_GET_VARS['products_id'] . ';'; //$recently_viewed = ""; } $check_not_duplicate = $HTTP_GET_VARS['products_id']; $temp_recent = $recently_viewed; if (!ereg($check_not_duplicate, $temp_recent ) ) $recently_viewed = $HTTP_GET_VARS['products_id'] . ';' . $recently_viewed ; $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, p.products_image_med, p.products_image_lrg, p.products_image_sm_1, p.products_image_xl_1, p.products_image_sm_2, p.products_image_xl_2, p.products_image_sm_3, p.products_image_xl_3, p.products_image_sm_4, p.products_image_xl_4, p.products_image_sm_5, p.products_image_xl_5, p.products_image_sm_6, p.products_image_xl_6, pd.products_url, p.products_price, p.products_map, p.products_tax_class_id, p.products_date_added, p.products_retail_price, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_info = tep_db_fetch_array($product_info_query); tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'"); if ($product_info['products_price']<$product_info['products_map']){ $products_price = '<a href="' . tep_href_link(FILENAME_CALL_FOR_PRICE, 'products_id=' . $product_info['products_id']) . '">' . CLICK_FOR_PRICE . '</a>'; }else{ if ($new_price = tep_get_products_special_price($product_info['products_id'])) { if ($new_price<$product_info['products_map']){ $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <a href="' . tep_href_link(FILENAME_CALL_FOR_PRICE, 'products_id=' . $product_info['products_id']) . '">' . CLICK_FOR_PRICE . '</a>'; }else{ $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>'; } } else { $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); } } if (tep_not_null($product_info['products_model'])) { $products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>'; } else { $products_name = $product_info['products_name']; } //DISPLAY PRODUCT WAS ADDED TO WISHLIST IF WISHLIST REDIRECT IS ENABLED if(tep_session_is_registered('wishlist_id')) { ?> <tr> <td class="messageStackSuccess"><?php echo PRODUCT_ADDED_TO_WISHLIST; ?></td> </tr> <?php tep_session_unregister('wishlist_id'); } ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="75%" class="pageHeading"><?php echo $products_name; ?></td> <td width="50%" align="right" class="pageheading" colspan="3">Your Price </td> </tr> <tr> <!-- // Price Match V1.00 image_link_bof //--> <!-- <td width="100%" align="right" valign="top" class="pageHeading" colspan="3"><?php echo $products_price; ?></td> //--> <td width="100%" align="right" valign="top" class="pageHeading" colspan="3"><?php echo $products_price; ?><br><?php echo '<a href="' . tep_href_link(FILENAME_PRICE_MATCH, 'products_id=' . $HTTP_GET_VARS['products_id']) . '">' . tep_image(DIR_WS_IMAGES . 'lowpriceguaranteed.jpg', BOX_HEADING_PRICE_ALT); ?></a></td> <!-- // Price Match V1.00 image_link_eof //--> </tr> <tr> <td class="main align="left" valign="top" colspan="2"> <table border="0" cellspacing="0" cellpadding="2" align="left"> <tr> <td align="center"> <?php // BOF MaxiDVD: Modified For Ultimate Images Pack! if (tep_not_null($product_info['products_image_med'])) { echo tep_image(DIR_WS_IMAGES . $product_info['products_image_med'], addslashes($product_info['products_name']), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT, 'hspace="0" vspace="5"'); } else { ?> <script language="javascript"><!-- document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id'] . 'ℑ=0') . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . tep_image_button('image_enlarge.gif', TEXT_CLICK_TO_ENLARGE) . '</a>'; ?>'); //--></script> <noscript> <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . tep_image_button('image_enlarge.gif', TEXT_CLICK_TO_ENLARGE) . '</a>'; ?> </noscript> <?php } // EOF MaxiDVD: Modified For Ultimate Images Pack! //affiliate build a link begin if (tep_session_is_registered('affiliate_id')) { ?> <?php echo '<a href="' . tep_href_link(FILENAME_AFFILIATE_BANNERS_BUILD, 'individual_banner_id=' . $product_info['products_id']) .'" target="_self">' . tep_image('includes/languages/english/images/buttons/button_affiliate_build_a_link.gif', 'Make a link') . ' </a>'; ?><?php } //affiliate build a link begin ?> </td> </tr> </table> </td> <td class="smallText" align="right" valign="top" colspan="2"> <?php if (tep_not_null($product_info['products_image'])) { ?> <?php } include(DIR_WS_MODULES . 'ezier_new_fields.php'); ?> </td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main"> <table class="main" width="100%"> <tr> <td class="main" align="left" valign="bottom"><img src="images/bizratesmall.jpg"></td> <td class="main" align="right" valign="bottom"><?php echo TEXT_QUANTITY . tep_draw_input_field('quantity', '1', 'SIZE=2 maxlength=2') . tep_draw_separator('pixel_trans.gif', '5', '1') . tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART, 'align=absmiddle'); ?></td> </tr> </table> <?php $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'"); $products_attributes = tep_db_fetch_array($products_attributes_query); if ($products_attributes['total'] > 0) { ?> <table align="right" valign="bottom" border="0" cellspacing="0" cellpadding="2"> <?php $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name"); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $products_options_array = array(); $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'"); while ($products_options = tep_db_fetch_array($products_options_query)) { $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']); if ($products_options['options_values_price'] != '0') { $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; } } if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) { $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]; } else { $selected_attribute = false; } ?> <tr> <td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td> <td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td> </tr> <?php } ?> </table> <?php } ?> <hr /> <div class="productDetails">» Details</div> <p><?php echo stripslashes($product_info['products_description']); ?></p> <?php // BOF MaxiDVD: Modified For Ultimate Images Pack! if (ULTIMATE_ADDITIONAL_IMAGES == 'enable') { include(DIR_WS_MODULES . 'additional_images.php'); } // BOF MaxiDVD: Modified For Ultimate Images Pack! ; ?> </td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"); $reviews = tep_db_fetch_array($reviews_query); if ($reviews['count'] > 0) { ?> <tr> <td class="main"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <hr /> <?php } if (tep_not_null($product_info['products_url'])) { ?> <tr> <td class="main" align="center"><?php // echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <!-- Pricematch //--> <tr><td> <? require(DIR_WS_LANGUAGES . $language . '/pricematch.php'); ?> <div align="center"> <table class="infoBoxContents" width="70%"><tr><td> <?php $this_Code = $product_info['products_model']; $this_Product = $product_info['products_name']; $this_Price = $product_info['products_price']; ?> <b>PRICEMATCH:</b> If you find this item cheaper elsewhere, please fill out our <?php echo '<a href="' . tep_href_link(FILENAME_PRICE_MATCH, 'products_id=' . $HTTP_GET_VARS['products_id']) . '">' . tep_image(DIR_WS_IMAGES . ' '); ?><u>Pricematch Form</u></a> and we will attempt to beat any valid competitors prices!</a> </td></tr></table></div> </td></tr> <!-- Pricematch EOF //--> <tr> <td align="center" class="smallText"><hr /></td> </tr> <?php //BOF - Custom hack for extra images //////////////////////////////////////// ?> <TR> <TD> <TABLE BORDER=0 CELLPADDING=2 CELLSPACING=0> <TR> <?php $rowcount_value=4; $rowcount=1; $products_extra_images_query = tep_db_query("SELECT products_extra_image, products_extra_images_id FROM " . TABLE_PRODUCTS_EXTRA_IMAGES . " WHERE products_id='" . $product_info['products_id'] . "'"); while ($extra_images = tep_db_fetch_array($products_extra_images_query)) { ?> <TD CLASS="main" WIDTH="<?php echo SMALL_IMAGE_WIDTH; ?>" VALIGN="top"> <script language="javascript"><!-- document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_EXTRA_IMAGES, 'peiID=' . $extra_images['products_extra_images_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $extra_images['products_extra_image'], addslashes($product_info['products_name']),SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>'); //--></SCRIPT> <NOSCRIPT> <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $extra_images['products_extra_image']) . '">' . tep_image(DIR_WS_IMAGES . $extra_images['products_extra_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?> </NOSCRIPT> </td> <?php if ($rowcount == $rowcount_value){echo '</tr><tr>'; $rowcount=1;} else {$rowcount=$rowcount+1;} } ?> </tr> </TABLE> </td> </tr> <?php //BOF - Custom hack for extra images //////////////////////////////////////// ?> <?php } ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class=" "> <tr class=" "> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main" align="left" valign="bottom"><?php $prod_quantity = tep_get_products_stock($products_id); switch ($prod_quantity) { case 0: print '<img src="images/stock_soldout.gif" border="0">'; break; case 1: print '<img src="images/stock_limitedstock.gif" border="0">'; break; case 2: print '<img src="images/stock_limitedstock.gif" border="0">'; break; case 3: print '<img src="images/stock_instock.gif" border="0">'; break; case 4: print '<img src="images/stock_instock.gif" border="0">'; break; default: print '<img src="images/stock_instock.gif" border="0">'; } ?> </td> <td class="main" align="center" valign="bottom"><?php echo tep_image_submit('wishlist.gif', IMAGE_WISHLIST); ?></td> <td class="main" align="right" valign="bottom"><?php echo TEXT_QUANTITY . tep_draw_input_field('quantity', '1', 'SIZE=2 maxlength=2') . tep_draw_separator('pixel_trans.gif', '5', '1') . tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART, 'align=absmiddle'); ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td> <?php //added for cross -sell if ( (USE_CACHE == 'true') && !SID) { echo tep_cache_also_purchased(3600); include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS); } else { include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS); include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS); } } ?> </td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><?php include(DIR_WS_MODULES . FILENAME_PRODUCT_SPECIALS); ?> </td> </tr> </table></form> <br> <? include(DIR_WS_MODULES . 'product_reviews_info.php'); ?> </td> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works. Link to comment Share on other sites More sharing options...
Iggy Posted June 30, 2007 Share Posted June 30, 2007 Product_info.php Hrrrm, well, two things. You definitely have a lot going on there. I've never used the auction, wishlist or ezier new fields so it's not entirely surprising no one was able to pipe up with an instant solution. Also, I feel for you here. The quantity box contribs are a mess. Cobbling 2 together I was able to get it working on a stock osC and that's about the best I can do in solving this particular problem except to give you the advice to set up an osC test bed and build it out very carefully until you find what is stopping the form from submitting the proper qty variable. Here are the affected files. This works for me. I dropped themhere if it's helpful. Iggy Everything's funny but nothing's a joke... Link to comment Share on other sites More sharing options...
Silverado05 Posted June 30, 2007 Author Share Posted June 30, 2007 The other contributions are not effecting this. It is a simple fix I am just not experienced with PHP enough to know how to fix this. When you only run one instance of the code it works fine, it's only when you run it twice, one at the top, one at the bottom where the problem occurs. While one still works, the other one doesn't I am sure it is something simple but like I said I am not skilled enough with PHP to know why or what to do. If anyone has a quick fix for this or know why this is happening I am open for suggestions. -Thanks Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works. Link to comment Share on other sites More sharing options...
Iggy Posted June 30, 2007 Share Posted June 30, 2007 The other contributions are not effecting this. It is a simple fix I am just not experienced with PHP enough to know how to fix this. When you only run one instance of the code it works fine, it's only when you run it twice, one at the top, one at the bottom where the problem occurs. While one still works, the other one doesn't I am sure it is something simple but like I said I am not skilled enough with PHP to know why or what to do. If anyone has a quick fix for this or know why this is happening I am open for suggestions.-Thanks Not sure, hard to troubleshoot (for me at least) without being able to run the page, make changes, run the page, make changes. Iggy Everything's funny but nothing's a joke... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.