Guest Posted May 13, 2011 Share Posted May 13, 2011 I was trying to work out how to add the extra pics under the main pic on the product page like the demo site have for the galaxy tablet. I'm using the latest version of OSC 2.3.1. Also the quainty box with a update button so customers can order more if they want befor they check out. DJ Link to comment Share on other sites More sharing options...
multimixer Posted May 13, 2011 Share Posted May 13, 2011 To add additional images, you need to click on "add large image" on the product editing page in admin. You can then either upload an image and/or enter something into the "html content" box, for example a youTube video To add a quantity box on the product info page is a simpe process, but require a couple of code changes, illustrated example here My community profile | Template system for osCommerce - New: Responsive | Feedback channel Link to comment Share on other sites More sharing options...
Guest Posted May 13, 2011 Share Posted May 13, 2011 To add additional images, you need to click on "add large image" on the product editing page in admin. You can then either upload an image and/or enter something into the "html content" box, for example a youTube video To add a quantity box on the product info page is a simpe process, but require a couple of code changes, illustrated example here So if i want 4 more small images under the larger image i just have to place the code within the that box and it will place them there. i'll give that a go and see how it go's. Thanks for that but the instructions seem to be wrong or out of date for the quantity box, as i can not find the correct line being the first line you show as example. I don't have 213 lines of code within the file you have specified the only line that has anything remotely simmilar is the follow code. <div style="float: right;"> <?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'triangle-1-e', tep_href_link(FILENAME_DEFAULT)); ?> </div> Your input to this matter would be great DJ Link to comment Share on other sites More sharing options...
Guest Posted May 13, 2011 Share Posted May 13, 2011 So if i want 4 more small images under the larger image i just have to place the code within the that box and it will place them there. i'll give that a go and see how it go's. Thanks for that but the instructions seem to be wrong or out of date for the quantity box, as i can not find the correct line being the first line you show as example. I don't have 213 lines of code within the file you have specified the only line that has anything remotely simmilar is the follow code. <div style="float: right;"> <?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'triangle-1-e', tep_href_link(FILENAME_DEFAULT)); ?> </div> Your input to this matter would be great it was there all along what a duffus. Thanks for that DJ Link to comment Share on other sites More sharing options...
multimixer Posted May 13, 2011 Share Posted May 13, 2011 If you want to add an aditional image 1) Go to the product edit page in admin 2) Click on "add large image" 3) select file on your computer and upload 4) Click "save" I hope it's clear now and it doesn't hurt to try it out by your self As for the quantity box, the link given is absolutely up to date and correct, please read the complete post. You probably either have a wrong file or look in a totally different section of it. Do not stick with line numbers as they can be a little different, search for the code mentioned in file catalog/product_info.php and you'll find it My community profile | Template system for osCommerce - New: Responsive | Feedback channel Link to comment Share on other sites More sharing options...
Guest Posted May 13, 2011 Share Posted May 13, 2011 If you want to add an aditional image 1) Go to the product edit page in admin 2) Click on "add large image" 3) select file on your computer and upload 4) Click "save" I hope it's clear now and it doesn't hurt to try it out by your self As for the quantity box, the link given is absolutely up to date and correct, please read the complete post. You probably either have a wrong file or look in a totally different section of it. Do not stick with line numbers as they can be a little different, search for the code mentioned in file catalog/product_info.php and you'll find it Sorry for being rude i have 4 kids running around so was not concertating. I found that the button was already there. As for adding extra pics still working on it dosen't seem to be working for me at the moment. your help is very much appreciated i mean in no way to be rude. DJ Link to comment Share on other sites More sharing options...
multimixer Posted May 13, 2011 Share Posted May 13, 2011 No problem :) If you still have the samsung galaxy product, you can take a look how it is done there. If you don't have it anymore, you can install an other osCommerce temporary to see there, or, in case your files are not altered to ask for any additional info from the database, you could import a stock database and replace it after with your own again. But it's really not hard, all you have to do is to click a couple of buttons, what exactly is not working? My community profile | Template system for osCommerce - New: Responsive | Feedback channel Link to comment Share on other sites More sharing options...
Guest Posted May 13, 2011 Share Posted May 13, 2011 where would i put the follow code <div id="piGal" style="float: right;"> <div style="text-align: center; width: 300px; display: none;" id="loading"><img src="ext/jquery/bxGallery/spinner.gif"></div><div class="outer"><ul style="display: block; height: 200px; width: 267px;"> <li style="position: absolute; display: list-item;"><a href="http://demo.oscommerce.com/images/samsung/galaxy_tab_1.jpg" target="_blank" rel="fancybox"><img style="width: 266.667px; height: 200px;" src="images/samsung/galaxy_tab_1.jpg" alt="" width="640" height="480"></a></li> <li style="position: absolute; display: none;"><a href="http://demo.oscommerce.com/images/samsung/galaxy_tab_2.jpg" target="_blank" rel="fancybox"><img style="width: 266.667px; height: 200px;" src="images/samsung/galaxy_tab_2.jpg" alt="" width="640" height="480"></a></li> <li style="position: absolute; display: none;"><a href="http://demo.oscommerce.com/images/samsung/galaxy_tab_3.jpg" target="_blank" rel="fancybox"><img style="width: 266.667px; height: 200px;" src="images/samsung/galaxy_tab_3.jpg" alt="" width="640" height="480"></a></li> <li style="position: absolute; display: none;"><a href="#piGalimg_4" target="_blank" rel="fancybox"><img style="width: 266.667px; height: 200px;" src="images/samsung/galaxy_tab_4.jpg" alt="" width="640" height="480"></a><div style="display: none;"><div id="piGalimg_4"><object type="application/x-shockwave-flash" data="http://www.youtube.com/watch?v=tAbsmHMAhrQ?fs=1&autoplay=1" width="640" height="385"><param name="movie" value="http://www.youtube.com/watch?v=tAbsmHMAhrQ?fs=1&autoplay=1"><param name="allowFullScreen" value="true"><param name="allowscriptaccess" value="always"><param name="wmode" value="transparent"></object></div></div></li> </ul><ul style="width: 300px;" class="thumbs"><li class="on" style="float: left; cursor: pointer; height: 56px; opacity: 1;"><img style="width: 75px; height: 56.25px;" src="images/samsung/galaxy_tab_1.jpg"></li><li class="" style="float: left; cursor: pointer; height: 56px; opacity: 0.7;"><img style="width: 75px; height: 56.25px;" src="images/samsung/galaxy_tab_2.jpg"></li><li class="" style="float: left; cursor: pointer; height: 56px; opacity: 0.7;"><img style="width: 75px; height: 56.25px;" src="images/samsung/galaxy_tab_3.jpg"></li><li class="" style="float: left; cursor: pointer; height: 56px; opacity: 0.7;"><img style="width: 75px; height: 56.25px;" src="images/samsung/galaxy_tab_4.jpg"></li></ul><div style="clear: both;"></div></div> </div> i have tried looking in the catalog/product_info.php file and cannot find where i could add the additional code. What i'm looking for is at this link http://demo.oscommerce.com/product_info.php?products_id=28 thats how i would like some or most of my product pages to look like. Thanks DJ Link to comment Share on other sites More sharing options...
Guest Posted May 13, 2011 Share Posted May 13, 2011 No problem :) If you still have the samsung galaxy product, you can take a look how it is done there. If you don't have it anymore, you can install an other osCommerce temporary to see there, or, in case your files are not altered to ask for any additional info from the database, you could import a stock database and replace it after with your own again. But it's really not hard, all you have to do is to click a couple of buttons, what exactly is not working? Getting the extra pic under the main pic for products i have looked in my admin and cannot find any buttons or settings to make it happen. Thanks DJ Link to comment Share on other sites More sharing options...
multimixer Posted May 13, 2011 Share Posted May 13, 2011 You don't need to add any code to any file. If you have version 2.3.1 of osCommerce, then you must have the area like on the above image, go to admin>>catalog>categories/products, navigate to a product, click on "edit" and you'll get it Are you sure you have version 2.3.1? What's your url? My community profile | Template system for osCommerce - New: Responsive | Feedback channel Link to comment Share on other sites More sharing options...
Guest Posted May 13, 2011 Share Posted May 13, 2011 https.dcsstore.net.au thanks dj Link to comment Share on other sites More sharing options...
burt Posted May 13, 2011 Share Posted May 13, 2011 http://www.clubosc.com/oscommerce-2-3-core-multiple-images.html Link to comment Share on other sites More sharing options...
Guest Posted May 13, 2011 Share Posted May 13, 2011 http://www.clubosc.com/oscommerce-2-3-core-multiple-images.html Thanks for that i have tried and still am i must be using wrong somewhere. Thanks DJ Link to comment Share on other sites More sharing options...
multimixer Posted May 13, 2011 Share Posted May 13, 2011 I added some images to here, take a look in your admin how it is done My community profile | Template system for osCommerce - New: Responsive | Feedback channel Link to comment Share on other sites More sharing options...
Guest Posted May 14, 2011 Share Posted May 14, 2011 I added some images to here, take a look in your admin how it is done So easy once its done for you. Not being able to find instructions that are clear doesn't help. Thank you very much for your help. DJ Link to comment Share on other sites More sharing options...
multimixer Posted May 14, 2011 Share Posted May 14, 2011 Could you manage to add images? My community profile | Template system for osCommerce - New: Responsive | Feedback channel Link to comment Share on other sites More sharing options...
♥14steve14 Posted May 14, 2011 Share Posted May 14, 2011 I had a similar problem with 2.3.1. In the end the problem was with me. I found you have to enter the same image in the first two image boxes when adding products. You can then click on add large images as many times as you want to add other images. I have eleven on one product, so it can be done.. REMEMBER BACKUP, BACKUP AND BACKUP Link to comment Share on other sites More sharing options...
ce7 Posted July 19, 2012 Share Posted July 19, 2012 Hi all, After lots of errors, questions, help from all experts from this forums (huge huge huge appreciation for those who reply me or helped me) I am so happy that I move to the last stage to add products. But it is too early to be happy, now I have new problems and it is similar question as how to add extra pics on product page like on the demo site. I had remove the samsung galaxy, to recall the code, I install it into the localhost server, had copy it to new one, but it doesn't change anything. I had few addons added into my product_info.php, and I editted a table there so that the custom buttons and text go to the right position I want them to be. No idea how and when but now I just don't have the same effect like samsung galaxy one. If I had only one product image, which one of the addon--product zommer works perfectly. If I had more then one product images via adding through +add large image, the product zommer doesn't work at all. On the top of that, I don't get the small images under the main product image like samsung galaxy does. (I had install KissIT Image thumbnailers, if didn't have this one, the picture images go crazy huge!!!); and all the image that don't line up horizontally but vertically Please find the images as it will be easier to understand what I just mentioned. <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2010 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO); $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); require(DIR_WS_INCLUDES . 'template_top.php'); if ($product_check['total'] < 1) { ?> <!--==================================================================================== // BOE Child Attributes (fnzb) --> <script type="text/javascript"> function createRequest() { return window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest(); } //=================================================== function loadChildOptions(prod_id,poid,povid) { var xmlHttp = createRequest(); xmlHttp.open("GET", "<?php echo FILENAME_CHILD_ATTRIBUTES; ?>?prod_id=" + prod_id + "&poid=" + poid + "&povid=" + povid, true) xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState!=4)return;if(xmlHttp.status==200){ document.getElementById("child_" + poid).innerHTML = xmlHttp.responseText; } }; xmlHttp.send(null); }//end function loadChildOptions </script> <!--// EOE Child Attributes (fnzb) //==================================================================================== --> <div class="contentContainer"> <div class="contentText"> <?php echo TEXT_PRODUCT_NOT_FOUND; ?> </div> <div style="float: right;"><!-- original code: < ?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'triangle-1-e', tep_href_link(FILENAME_DEFAULT)); ?>--> <?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?> </div> </div> <?php } else { // Original code, replaced for Products Fields Groups 20120715_P36 // $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, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, 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 . "'"); // BOF Products Fields Groups _20120715_P36 // start Product Fields groups $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, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id, p.products_fields_group_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 . "'"); // end Product Fields groups // EOF Products Fields Groups _20120715_P36 $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 ($new_price = tep_get_products_special_price($product_info['products_id'])) { $products_price = '<del>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</del> <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']; } ?> <?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"> <tr> <td width="65%" > <h1 style="float: left;"><?php echo $products_name;?></h1> <h1> </h1> </td> <td width="5%"> <h1> <div> <?php // Start PDF Datasheet _20120622_P13 // echo '<a href="' . tep_href_link( 'pdf_datasheet.php', 'products_id=' . ( int )$_GET['products_id'] . '&language=' . $language ) . '" alt="' . TEXT_DOWNLOAD_PDF . '" title="' . TEXT_DOWNLOAD_PDF . '">' . tep_image( DIR_WS_ICONS . 'pdf_small.png', TEXT_DOWNLOAD_PDF ) . ' ' . addslashes( $product_info['products_name'] ) . TEXT_PDF_DATASHEET . '</a>'; /*echo '<a href="' . tep_href_link( 'pdf_datasheet.php', 'products_id=' . ( int )$_GET['products_id'] . '&language=' . $language ) . '" alt="' . TEXT_DOWNLOAD_PDF . '" title="' . TEXT_DOWNLOAD_PDF //. '">' .'" target="_blank">' . tep_image( DIR_WS_ICONS . 'pdf_small.png', TEXT_DOWNLOAD_PDF ) . ' ' . '</a>';?></h1> <div style="clear: both;"></div> <br /> <?php // End PDF Datasheet _20120622_P13*/ ?> </div> </h1> </td> <td width="30%"> <h1 style="float: right;"><?php echo $products_price; ?> </h1> </td> </tr> </table> <table border="0" width="100%" cellspacing="2" cellpadding="2"> <tr height="75%"> <td width="75%"> <?php echo stripslashes($product_info['products_description']); ?><br/> <!-- BOF Products Fields Groups _20120715_P36 --> <!--- start Product Fields groups --> <div style="clear: both;"></div> <? $groups_query = "select po.products_options_name , pfgv.products_fields_group_values from " . TABLE_PRODUCT_FIELDS_GROUPS_ATTRIBUTES . " pfga, " . TABLE_PRODUCTS_OPTIONS . " po, " . TABLE_PRODUCT_FIELDS_GROUPS_VALUES . " pfgv where pfga.products_fields_group_id = '".(int)$product_info['products_fields_group_id']."' and po.products_options_id = pfga.products_options_id and pfga.products_options_id = pfgv.products_options_id and pfga.products_fields_group_id = pfgv.products_fields_group_id and po.language_id = '" . (int)$languages_id . "' and pfgv.language_id = '" . (int)$languages_id . "' and pfgv.products_id = '".$product_info['products_id']."' and pfga.products_fields_group_sort_order > 0 order by pfga.products_fields_group_sort_order"; $groups_count_query = tep_db_query($groups_query); $groups_count = tep_db_num_rows($groups_count_query); if($product_info['products_fields_group_id'] && $groups_count > 0){ if(tep_get_group_orientation($product_info['products_fields_group_id'])){ // Vertical output ?> <div class="ui-widget infoBoxContainer" style="margin-top:20px;"> <table cellspacing="2" cellpadding="1"> <? $groups_vertical_query = tep_db_query($groups_query); while($results_group_vertical_query = tep_db_fetch_array($groups_vertical_query)){ ?> <tr> <td valign="top" style="padding:5px;"><? echo $results_group_vertical_query['products_options_name'];?></td> <td class="ui-widget-content" valign="top" style="padding:5px;"><? echo $results_group_vertical_query['products_fields_group_values'];?></td> </tr> <? } ?> </table> </div> <? }else{ // Horizontal output $groups_horizontal_query = tep_db_query($groups_query); while($results_group_horizontal_query = tep_db_fetch_array($groups_horizontal_query)){ $results_group_horizontal_array[] = $results_group_horizontal_query; } ?> <div class="ui-widget infoBoxContainer"> <div class="ui-widget-header ui-corner-top infoBoxHeading"> <table border="0" width="100%" cellspacing="0" cellpadding="2" class="productListingHeader"> <tr> <? for ($i = 0, $n = sizeof($results_group_horizontal_array); $i < $n; $i ++) { ?> <td class="productListing-heading"> <? echo $results_group_horizontal_array[$i]['products_options_name']?></td> <? } ?> </tr> </table> </div> <div class="ui-widget-content ui-corner-bottom productListTable"> <table border="0" width="100%" cellspacing="0" cellpadding="2" class="productListingData"> <tr> <? for ($i = 0, $n = sizeof($results_group_horizontal_array); $i < $n; $i ++) { ?> <td valign="top"><? echo $results_group_horizontal_array[$i]['products_fields_group_values']?></td> <? } ?> </tr> </table> </div> </div> <? } ?> <div style="clear:both; margin-bottom:20px;"></div> <? }?> <!---end Product Fields groups--> <!-- EOF Products Fields Groups _20120715_P36 --> <p><?php echo TEXT_PRODUCT_OPTIONS; ?></p> </td> <td width="25%" align="left"> <div id="piGal" style="float: right;"> <!-- original code, replaced for KissIT Image Thumbnailers _20120717_IM29 < ?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank" rel="fancybox">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), null, null, 'hspace="5" vspace="5"') . '</a>'; ?> --> <div class="contentContainer"> <div class="contentText"> <?php if (tep_not_null($product_info['products_image'])) { $pi_query = tep_db_query("select image, htmlcontent from " . TABLE_PRODUCTS_IMAGES . " where products_id = '" . (int)$product_info['products_id'] . "' order by sort_order"); if (tep_db_num_rows($pi_query) > 0) { ?> <!-- 20120621, change the product page layout ref: http://multimixer.gr/16/05/2011/making-a-oscommerce-template-all-the-progress-step-by-step/ original code: <div id="piGal" style="float: right;"> --> <div id="piGal" style="float: right;"> <ul><?php $pi_counter = 0; while ($pi = tep_db_fetch_array($pi_query)) { $pi_counter++; $pi_entry = ' <li><a href="'; if (tep_not_null($pi['htmlcontent'])) { $pi_entry .= '#piGalimg_' . $pi_counter; } else { $pi_entry .= tep_href_link(DIR_WS_IMAGES . $pi['image']); } // Original code, replaced for KissIT Image Thumbnailers 20120715_IM29 // $pi_entry .= '" target="_blank" rel="fancybox">' . tep_image(DIR_WS_IMAGES . $pi['image']) . '</a>'; // BOF KissIT Image Thumbnailers _20120717_IM29 $pi_entry .= '" target="_blank" rel="fancybox">' . tep_image( DIR_WS_IMAGES . $pi['image'], '', KISSIT_MAIN_PRODUCT_IMAGE_WIDTH, KISSIT_MAIN_PRODUCT_IMAGE_HEIGHT ) . '</a>'; // EOF KissIT Image Thumbnailers _20120717_IM29 if (tep_not_null($pi['htmlcontent'])) { $pi_entry .= '<div style="display: none;"><div id="piGalimg_' . $pi_counter . '">' . $pi['htmlcontent'] . '</div></div>'; } $pi_entry .= '</li>'; echo $pi_entry; }?> </ul> </div> <script type="text/javascript"> // original code, replaced for KissIT Image Thumbnailers _20120717_IM29 $('#piGal ul').bxGallery({maxwidth: 300, maxheight: 200, //$('#piGal ul').bxGallery({ //maxwidth: <?php echo KISSIT_MAIN_PRODUCT_IMAGE_WIDTH; ?>, //maxheight: <?php echo KISSIT_MAIN_PRODUCT_IMAGE_HEIGHT; ?>, humbwidth: <?php echo (($pi_counter > 1) ? '75' : '0'); ?>, thumbcontainer: 300, load_image: 'ext/jquery/bxGallery/spinner.gif'}); </script> <?php } else { ?> <div id="piGal" style="float: right;"> <!-- BOF Product Zoomer --> <p><img id="myimage" src="<?php echo DIR_WS_IMAGES . $product_info['products_image']?>" style="width:<?php echo SMALL_IMAGE_WIDTH ?>px; height:<?php echo SMALL_IMAGE_HEIGHT ?>px" /></p> <p id="piGal" class="smallText" style="text-align:center;"> <a href="<?php echo tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) ?>" target="_blank" rel="fancybox"><?php echo TEXT_CLICK_TO_ENLARGE ?></a> <!-- EOF Product Zoomer --> <?php } ?> <!-- EOF Product Zoomer --> <script type="text/javascript"> $("#piGal a[rel^='fancybox']").fancybox({ cyclic: true}); </script> <?php } ?> <!-- BOF KissIT Image Thumbnailers _20120717_IM29 --> <?php /*echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank" rel="fancybox">' . tep_image( DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), KISSIT_MAIN_PRODUCT_IMAGE_WIDTH, KISSIT_MAIN_PRODUCT_IMAGE_HEIGHT, 'hspace="5" vspace="5"' ) . '</a>'; */?> <!-- EOF KissIT Image Thumbnailers _20120717_IM29 --> </div> </td> </tr> </table> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <div class="buttonSet" style="float:right;"> <tr> <td width="25%"> <div style="float: left;"> <?php echo '<a href="' . (($reviews['count'] > 0) ? ' (' . $reviews['count'] . ')' : '') . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_review.gif', IMAGE_BUTTON_REVIEW) . '</a>'; ?><br/> </td> <td width="75%"> <div class="buttonSet" style="float:right;"> <?php // BOF move the social bookmars to the product information page 20120610 // ref: http://multimixer.gr/26/07/2011/move-social-bookmarks-to-the-product-information-page/ if (tep_not_null(MODULE_SOCIAL_BOOKMARKS_INSTALLED)) { $sbm_array = explode(';', MODULE_SOCIAL_BOOKMARKS_INSTALLED); $social_bookmarks = array(); foreach ( $sbm_array as $sbm ) { $class = substr($sbm, 0, strrpos($sbm, '.')); if ( !class_exists($class) ) { include(DIR_WS_LANGUAGES . $language . '/modules/social_bookmarks/' . $sbm); include(DIR_WS_MODULES . 'social_bookmarks/' . $class . '.php'); } $sb = new $class(); if ( $sb->isEnabled() ) { $social_bookmarks[] = $sb->getOutput(); } } if (!empty($social_bookmarks)) $social = implode(' ', $social_bookmarks); }?> <p class="social" align="left"><?php echo $social ?> </p> <!-- EOF // ref http://multimixer.gr/26/07/2011/move-social-bookmarks-to-the-product-information-page/ 20120610--> </div> </td> </tr> <tr> <div class="buttonSet" style="float:left;"> <td width="25%"> <?php $referer = $_SERVER['HTTP_REFERER']; if (!$referer == '') { echo '<a href="' . $referer . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; } else { echo '<a href="' . tep_href_link(FILENAME_DEFAULT, tep_get_path($current_category_id = '')) . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; }?> </td> <td width="25%"> <div class="buttonSet" style="float:right;"> <?php echo tep_draw_hidden_field ('products_id', $product_info['products_id']) . tep_draw_input_field ('cart_quantity', 1, 'size="15" style="vertical-align:middle; align:center"; input title="Please change new Q\'ty here"; font-size:x-small' ) . '<br/>' . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); //.tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?> </div> </td> </div> </tr> <tr> <td> <!-- BOF Sitemap SEO _20120612_BOX09 --> <!-- Begin Sitemap SEO--> <script type='text/javascript' src='file:///I|/MG_shop_web_2/shop_029_20120623_buttons/javascript/sitemap_seo.js'></script> <?php require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SITEMAP_SEO); include(DIR_WS_MODULES . FILENAME_SITEMAP_SEO_PRODUCT); include(DIR_WS_MODULES . FILENAME_SITEMAP_SEO_CATEGORY); include(DIR_WS_MODULES . FILENAME_SITEMAP_SEO_MANUFACTURERS); ?> <!-- End Sitemap SEO --> <!-- EOF Sitemap SEO _20120612_BOX09 --> </td> </tr> </table> <?php //echo stripslashes($product_info['products_description']); ?> <?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) { // BOF Original code, replaced for QTPro Featured 20120710_P06 /* /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ?> <p><?php //echo TEXT_PRODUCT_OPTIONS; ?></p> <p> <?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 (is_string($HTTP_GET_VARS['products_id']) && 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; } ?> <!-- original code, replaced for Child Attributes 20120706_P51 <strong>< ?php echo $products_options_name['products_options_name'] . ':'; ?></strong><br />< ?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?><br /> //--> <?php */ // EOF Original code, replaced for QTPro Featured 20120710_P06 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // BOF QTPro Featured Track and manage attribute stock 20120710_P06 //++++ QT Pro: Begin Changed code $products_id=(preg_match("/^\d{1,10}(\{\d{1,10}\}\d{1,10})*$/", $HTTP_GET_VARS['products_id']) ? $HTTP_GET_VARS['products_id'] : (int)$HTTP_GET_VARS['products_id']); require(DIR_WS_CLASSES . 'pad_' . PRODINFO_ATTRIBUTE_PLUGIN . '.php'); $class = 'pad_' . PRODINFO_ATTRIBUTE_PLUGIN; $pad = new $class($products_id); echo $pad->draw(); } //Display a table with which attributecombinations is on stock to the customer? if(PRODINFO_ATTRIBUTE_DISPLAY_STOCK_LIST == 'True'): require(DIR_WS_MODULES . "qtpro_stock_table.php"); endif; //++++ QT Pro: End Changed Code // EOF QTPro Featured Track and manage attribute stock 20120710_P06 if (is_string($HTTP_GET_VARS['products_id']) && 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; } //==================================================================================== // BOF Child Attributes (fnzb) echo '<strong>' . $products_options_name['products_options_name'] . ' </strong><br />' . tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute, 'id="id_' . $products_options_name['products_options_id'] . '"'); echo '<div id="child_' . $products_options_name['products_options_id'] . '"></div><br/>'; ?> <script type="text/javascript"> $( "#<?php echo 'id_' . $products_options_name['products_options_id']?>" ).change(function() {loadChildOptions('<?php echo $HTTP_GET_VARS['products_id']?>','<?php echo $products_options_name['products_options_id']?>',this.value);}); $( "#<?php echo 'id_' . $products_options_name['products_options_id']?>" ).trigger('change'); </script> <?php // EOF Child Attributes (fnzb) //==================================================================================== } ?> </p> <?php // } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ?> <div style="clear: both;"></div> <?php if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) { ?> <p style="text-align: center;"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></p> <?php } ?> <?php $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and reviews_status = 1"); $reviews = tep_db_fetch_array($reviews_query); ?> <?php if ((USE_CACHE == 'true') && empty($SID)) { echo tep_cache_also_purchased(3600); } else { include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS); } ?> </form> <?php // } require(DIR_WS_INCLUDES . 'template_bottom.php'); require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Attached my product_info.php as below. Can anyone please help to point out what I have done wrong? Many thanks in advance. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.