Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Denkster

Members
  • Posts

    172
  • Joined

  • Last visited

Everything posted by Denkster

  1. Dear BrockleyJohn, Thank you very much for your attention and quick reply. I really appreciate your effort and I will make good use of it. Respectfully Eveline
  2. Hi, I am trying to add this "54032-new-complete-order-editing-tool" to CE-Phoenix 1.0.2.5. I added the new files and modified the files to modify. All very nice. But I get this error: Fatal error: Cannot declare class hook_admin_orders_edit_orders, because the name is already in use in catalog\includes\hooks\admin\orders\edit_orders.php on line 17 Any idea what I did wrong? Much obliged! Eveline
  3. Dear Dan, Your advice worked out (after some adjustments) fine! Strange, if someone had asked me the question I asked you, I probably would have given the same answer you did. Somehow I needed you to convince me ... Of course I needed to change the change the original copy of that file, replace the FILENAME_... variables with hard coded filenames and the folder variable names with hard coded names of the folders. And I needed to replace the odd tests of this kind: if (FILENAME_EMAIL_STATUS !== 'email_status.php') { with statements of this shape: if ( file_exists('email_status.php') ) { But after those changes, I did not get double sets of order_totals anymore. So I am quite happy again, thanks to you , Dan, Thank you!
  4. The next problem... When I open an order for editing I get a URL like this: ../edit_orders.php?page=1&oID=1695&action=edit I normally find four order total lines on that page. Having changed NOTHING, When I click on the update button below the order total lines the system updates the order in a very peculiar way. I get an extra set of 4 order total lines, identical to the set of 4 which I already had! When I click once again, 4 more order total lines appear! Is this a known problem? I checked the parse time log, these queries are executed: 04/06/2017 19:12:33 [QUERY] DELETE FROM orders_total WHERE orders_id = '1695' 04/06/2017 19:12:33 [QUERY] insert into orders_total (orders_id, title, text, value, class, sort_order) values ('1695', 'Zone tarieven (Naar NL : 165 kg):', '€ 7,20', '7.2', 'ot_shipping', '1') 04/06/2017 19:12:33 [QUERY] insert into orders_total (orders_id, title, text, value, class, sort_order) values ('1695', 'BTW hoog:', '€ 3,85', '3.8528937768595', 'ot_tax', '2') 04/06/2017 19:12:33 [QUERY] insert into orders_total (orders_id, title, text, value, class, sort_order) values ('1695', 'Subtotaal incl. BTW:', '€ 15,00', '15.000007', 'ot_subtotal', '3') 04/06/2017 19:12:33 [QUERY] insert into orders_total (orders_id, title, text, value, class, sort_order) values ('1695', 'Totaal:', '<strong>€ 22,20</strong>', '22.200007', 'ot_total', '4') But the 4 inserts are done multiple times! I am perplexed! Any idea? Eveline
  5. Ok Dan, I can agree and will go with your explanation. I found 8 occurrences of this odd test. If I look at the occurrences where I recognize the file name, I see that the code is intended to place a button on screen, with a link to the file mentioned in the test. So I will assume that the test is meant to check if the corresponding file (and hopefully the module) exists.. Thanks for guiding me through the discovery process. Eveline
  6. You mean the code would become: if (FILENAME_EMAIL_STATUS !== 'email_status.php') { Sorry, I don't want to be a nuisance, I may just be stupid, but I still don't get it. Suppose filenames are no longer defined. In that case the variable FILENAME_EMAIL_STATUS is supposed to not be in use anywhere. It is meaningless. What would be the meaning of the above code then? Wouldn't it be better to use something like this: if ( file_exists('email_status.php') ) { Or am I missing the point again? Eveline
  7. Thanks Dan, Apart from the purpose of the unknown add on it seems to be related to, I was wondering how a statement like this was meant to work: if (FILENAME_EMAIL_STATUS !== 'FILENAME_EMAIL_STATUS' ) { I guess it checks if the variable FILENAME_EMAIL_STATUS is defined? How would that work in the new situation, where filenames are no longer represented with variables, but hard coded? Eveline
  8. I want to do it right.. Made mistakes before.. Can you please explain what the purpose is of statements like this: <?php if (FILENAME_GOOGLE_MAP !== 'FILENAME_GOOGLE_MAP' ) { ?> Thanks in advance.. Eveline
  9. Hi Dan, Yes, you are right, I have got it working now. Translations for those: FILENAME_EMAIL_STATUS, FILENAME_EMAIL_ORDER_TEXT, FILENAME_ORDERS_LABEL, FILENAME_GOOGLE_MAP are not required, it seems. What do you think, should I post my version of the package (as a full package for order editor) to http://addons.oscommerce.com/info/7844 ? Eveline
  10. Hi Dan, Thank you, yes, I know about the compatibility add-on. But I reckon it is not very nice to name a contribution " ..for_2.3.4_BS" and still need a compatibility add-on. The version v1.2.4.1 of this (Order editor) contribution is not really old, is it? So I started to replace the FILENAME_.. and DIR_WS... occurrences as good as I could. Until now I did not have issues with the items that I could not replace FILENAME_EMAIL_STATUS, FILENAME_EMAIL_ORDER_TEXT, FILENAME_ORDERS_LABEL, FILENAME_GOOGLE_MAP I did not find these names in the compatibility add-on anyway. I checked http://addons.oscommerce.com/info/9506 "Add-On Compatibility support for OsCommerce 2.3.4 BS EDGE versions since September 2016" I suppose above mentioned file names have effect only with a contribution which I do not use? Thanks for caring! Eveline 7844_Denkster_3th_corrections on 7844_Order_editor_for_2.3.4BS.zip
  11. MORE Replaced path/filename parameters with actual paths and translations See attachment. Translations for Gwenn's orfder total modules included! 7844_Denkster_corrections on 7844_Order_editor_for_2.3.4BS.zip
  12. Replaced path/filename parameters with actual paths Although the contribution 7844 is called Order_Editor_for_2.3.4_BS_v1.2.4.1, I found it is not fully compatible with OsCommerce 2.3.4BS Edge. In OsCommerce 2.3.4BS Edge, the files catalog/includes/filenames.php and catalog/admin/includes/filenames.php no longer exist. All path/filename references are supposed to be hard coded So I edited the files I found via http://addons.oscommerce.com/info/7844 All went well except for the following lines of edit_orders.php: 181: if (FILENAME_EMAIL_STATUS !== 'FILENAME_EMAIL_STATUS' ) { 247 if (FILENAME_GOOGLE_MAP !== 'FILENAME_GOOGLE_MAP' ) { 784 if ( FILENAME_EMAIL_ORDER_TEXT !== 'FILENAME_EMAIL_ORDER_TEXT' ){ 907 if ('invoice_pdf.php' !== 'FILENAME_PDF_INVOICE' ) { 1128-1141 <!- bof 5.0.8 --> <?php if ('invoice_pdf.php' !== 'FILENAME_PDF_INVOICE' ) { ?> <li><?php echo '<a href="' . tep_href_link('invoice_pdf.php', 'oID=' . $_GET['oID']) . '" TARGET="_blank">' . tep_image_button('button_invoice_pdf.gif', IMAGE_ORDERS_INVOICE) . '</a>'; ?></li> <?php } ?> <?php if ('packingslip_pdf.php' !== 'FILENAME_PDF_PACKINGSLIP' ) { ?> <li><?php echo '<a href="' . tep_href_link('packingslip_pdf.php', 'oID=' . $_GET['oID']) . '" TARGET="_blank">' . tep_image_button('button_packingslip_pdf.gif', IMAGE_ORDERS_PACKINGSLIP) . '</a>'; ?></li> <?php } ?> <?php if (FILENAME_ORDERS_LABEL !== 'FILENAME_ORDERS_LABEL' ) { ?> <li><?php echo '<a href="' . tep_href_link(FILENAME_ORDERS_LABEL, 'oID=' . $_GET['oID']) . '" TARGET="_blank">' . tep_image_button('button_label.gif', IMAGE_ORDERS_LABEL) . '</a>'; ?></li> <?php } ?> <?php if (FILENAME_GOOGLE_MAP !== 'FILENAME_GOOGLE_MAP' ) { ?> <li><?php echo '<a href="' . tep_href_link(FILENAME_GOOGLE_MAP, 'oID=' . $HTTP_GET_VARS['oID']) . '" TARGET="_blank">' . tep_image_button('button_google_directions.gif', IMAGE_GOOGLE_DIRECTIONS) . '</a>'; ?></li> <?php } ?> <!- eof 5.0.8 --> What Should be done with these lines? Help, explain, please? So I updated the files asto the best of my knowledge. I corrected the layout (statement indentation, which was a mess). I also translated the language file to Dutch The results are attached. If you think I did it right, please update the contribution at http://addons.oscommerce.com/info/7844 using my input? Best regards Eveline Denkster_corrections on 7844_Order_editor_for_2.3.4BS.zip
  13. Hi Dan, Thank you for that information, sad as it is. I am sorry. May he rest in peace. He will live on in his work, I hope. Unfortunately his add-on page is closed for others to post. Eveline
  14. Hi Dokta, I updated your Addon 8885_Invoice Editor, to comply with 2.3.4BS Edge. It is now 8885_Invoice_Editor_v.1.4_for_2.3.4_BS. 20170324 by Denkster Changes in 1.4: - adapted to OsC 2.3.4BS - replaced <table.><tr><td> layout elements with <div> layout elements - Removed admin/includes/filenames.php - hard coded folder names and file names in code lines - replaced tpdf (not maintained) by fpdf (is maintained) - updated Install.txt Complete package attached. Eveline Bernard 8885_Invoice_Editor_v.1.4_for_2.3.4_BS.zip
  15. Hi, Anyone still having problems with image contributions and USU5? As Robert is telling us over and over, "the problem lies outside USU5", and he is right. For those who are still struggling to know where outside, here are two posts of mine that show image contributions, which I revised to work correctly with USU5. 1032 Additional images module see my post http://www.oscommerce.com/forums/topic/35801-contribution-additional-images-module/page__view__findpost__p__1594131 6238 Product Cycle Slideshow see my post http://www.oscommerce.com/forums/topic/315453-products-cycle-slideshow/page__view__findpost__p__1593933 Please use them to our mutual advantage and feel free to comment. Regards Eveline
  16. Sorry for delay in answering. I was not watching this forum, while searching for the cause and a solution myself. Please correct me if I'm wrong, here are my thoughts. The problem I found with USU5 in combination with image add-ons was that USU5 did not redirect correctly after putting a product in the shopping cart. The cause of the problem seemed to be: (I'm not sure if the cause was Additional Images only or Product Cycle Slideshow too) USU5 requires strict and correct use of the function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL'). Linking to a page directly (without tep_href_link), or with a different function, is not allowed when using USU5. The parameters in the page URL must be inside the brackets. Parameters cannot be added outside tep_href_link(), or USU5 will redirect to an unintended location. This goes for the front end of the shop; AFAIK USU does not change the admin. In at least one link of an image application I found link-URL parameters outside the function brackets (type 1 error). I found an error of the first type, in line 150 of displayimages.php document.write(\'<a href="' . (!$this->onpagemenu ? 'javascript:popupWindow(\\\'' : '') . tep_href_link( $this->linkurl, ($item==0&&$this->groupwithparent=='true'?'pID='.$products_id:'imagesID='.$addimages_images[$item]['id'])) . (!empty($_GET['products_id']) ? '&products_id='.$_GET['products_id'] : '') . (!empty($_GET['cPath']) ? '&cPath='.$_GET['cPath'] : '') . (!$this->onpagemenu ? '\\\')' : '') . '"' . $t_menu_mouseover . '>' . tep_image(DIR_WS_IMAGES . $addimages_images[$item]['image'], addslashes($addimages_images[$item]['desc']), (ADDIMAGES_RESTRICT_PARENT=='false'&&$item==0&&$this->groupwithparent=='true'?'':$addimages_image_width), (ADDIMAGES_RESTRICT_PARENT=='false'&&$item==0&&$this->groupwithparent=='true'?'':$addimages_image_height), 'hspace="5" vspace="5"') . '<br>' . (!empty($addimages_images[$item]['desc'])?addslashes($addimages_images[$item]['desc']):TEXT_CLICK_TO_ENLARGE) . '</a>\'); In that line, these URL parameters (if !empty) are outside the brackets op tep_href_link(): '&products_id='.$_GET['products_id'] .'&cPath='.$_GET['cPath'] I found an error of the 2nd type (link notusing tep_href_link) in line 407 of additional_images.php $lc_text = ' <a href="javascript:popupWindow(\'additional_images_popup.php?'.(!empty($listing['additional_images_id'])?'additional_images_id='.$listing['additional_images_id']:'products_id='.$listing['products_id']).'\')">' . ($_GET['show_images'] == 'y' ? tep_image(DIR_WS_CATALOG . DIR_WS_IMAGES . (!empty($listing['products_image']) ? $listing['products_image'] : (!empty($listing['products_image_med']) ? $listing['products_image_med'] : (!empty($listing['products_image_pop']) ? $listing['products_image_pop'] : '' ) ) ), $listing['products_name'], (ADDIMAGES_RESTRICT_IMAGE_SIZE=='true'?SMALL_IMAGE_WIDTH:''), (ADDIMAGES_RESTRICT_IMAGE_SIZE=='true'?SMALL_IMAGE_HEIGHT:'')) : '') . '</a> '; And in line 142 of displayimages.php document.write(\'<a href="images/' . $addimages_images[$item]['popimage'] . '"target="_blank" rel="lightbox[group]" title="' . addslashes(htmlspecialchars($addimages_images[$item]['desc'])) .'"' . $t_menu_mouseover . '>' . tep_image(DIR_WS_IMAGES . $addimages_images[$item]['image'], addslashes(htmlspecialchars($addimages_images[$item]['desc'])), (ADDIMAGES_RESTRICT_PARENT=='false'&&$item==0&&$this->groupwithparent=='true'?'':$addimages_image_width), (ADDIMAGES_RESTRICT_PARENT=='false'&&$item==0&&$this->groupwithparent=='true'?'':$addimages_image_height), 'hspace="5" vspace="5"') . '<br>' . (!empty($addimages_images[$item]['desc'])?addslashes($addimages_images[$item]['desc']):TEXT_CLICK_TO_ENLARGE). '</a>\'); And in line 35 of categories.php define('TEXT_PRODUCT_MORE_INFORMATION', 'For more information, please visit this products <a href="http://%s" target="blank"><u>webpage</u></a>.');
  17. I need to tell you, one of the ideas I used comes from Korben83: http://www.oscommerce.com/forums/topic/315453-products-cycle-slideshow/page__view__findpost__p__1525821 Thanks Eveline
  18. Dear friends, Please take a look at my alternative for product_cycle_slideshow.php. Feel free to comment. If some of you think it is useful, I will add my thing to the add-on-site. These files I changed: product_cycle_slideshow.php stylesheet.css (addition) index.php (addition) Install.sql The files are published below. For details, please read my comments in the files. Change log Some conflicts and incompatibilities (W3C, Ultimate Search Optimized URL's 5) are solved. Image size variables and 'Display Boxes' are now controllable via admin. An on/off switch now exists in admin and code for index.php is altered to allow for switching the PCS on and off. The code is more expendable. It allows for adding more types of products to display in the PCS. Changed the selected image to display: show the image p.products_image_med if that IS NOT NULL Unsolved issue I did not yet find a solution to get the image description where it belongs (between the tags <div id="PCS1Output" class="PCSOutput"></div>) If you know how that should be done, please help? The result can be seen at My link Attached is a screenshot of the admin: Here is my version of product_cycle_slideshow.php <?php /* $Id: product_cycle_slideshow.php $Path: /catalog/includes/modules/ Products Cycle Slideshow Copyright (c) 2008 Olof Larsson Released under the GNU General Public License 20110708 Denkster Changed style of comment from # to //, like everywhere else in OsC 20110711 Denkster Use arrays for Box_Headings, order by, limits, query names and result-arrays; Combine all queries, while loops and displays in one for-loop. 20110712 Denkster W3C-validate: replace <div class="PCSChild" alt=".."> with <div class="PCSChild"> and move alt-content to text block below image Add comments. Replace <s> (deprecated) by <span class="strike"> (and add .strike line-through in stylesheet.css). Make variables PCS_DISPLAY_BOXES, PCS_MAX_IMAGE_HEIGHT, PCS_MAX_IMAGE_WIDTH controllable via admin (And add configuration keys PCS_DISPLAY_BOXES, PCS_MAX_IMAGE_HEIGHT, PCS_MAX_IMAGE_WIDTH, to TABLE_CONFIGURATION). Use variable PCS_DISPLAY_BOXES, to control display of pager boxes true/false (And add configuration key PCS_DISPLAY_BOXES to TABLE_CONFIGURATION). 20110714 Denkster Move classes for box sizes from stylesheet.css to here, to be able to control them with variables. Added title=" " attribute to image tag 20110722 Denkster Changed the selected image to display: show the image p.products_image_med if that IS NOT NULL */ ?> <style type="text/css"> <!-- .ProductsCycleSlideshowWrapper { /*width: ProductsCycleSlideshow width +4 */ width: <?php echo PCS_MAX_IMAGE_WIDTH +22;?>px; padding:0; margin:0; overflow: hidden; text-align:center; } .ProductsCycleSlideshow { /*height: PCSChild height + 2*7(for PCSChild padding) +22 (for 2 lines of text) */ height: <?php echo PCS_MAX_IMAGE_HEIGHT +40;?>px; /*width: PCSChild width + 2*PCSChild padding */ width: <?php echo PCS_MAX_IMAGE_WIDTH +18;?>px; padding: 0; margin: 0; overflow: hidden; border: 0px solid #bbc3d3; background-color: #ffffff; } .PCSChild { /*height: maximum image height +4 (space) */ height: <?php echo PCS_MAX_IMAGE_HEIGHT +4;?>px; /*width: maximum image width +4 */ width: <?php echo PCS_MAX_IMAGE_WIDTH +4;?>px; padding: 7px; text-align: center; top: 0; left: 0 } --> </style> <?php function pcs_href_image($src_path){ $strRet = DIR_WS_IMAGES.'pcs_images/'.basename($src_path).'_'.PCS_MAX_IMAGE_HEIGHT.'_'.PCS_MAX_IMAGE_WIDTH.'_'.PCS_IMAGE_QUALITY.'.jpg'; // This will be the filename of the resized image. // Check to see if source file exists if(!file_exists($strRet)){ //Create the file if it does not exist if(!file_exists($src_path)) { return DIR_WS_IMAGES.'pcs_images/'.'error1.jpg'; } // Check to see if source file is readable elseif(!is_readable($src_path)) { return DIR_WS_IMAGES.'pcs_images/'.'error2.jpg'; } // Check if gif if ( stristr(strtolower($src_path),'.gif')) $oldImage = ImageCreateFromGif($src_path); // Check if jpg elseif ( stristr(strtolower($src_path),'.jpg') || stristr(strtolower($src_path),'.jpeg')) $oldImage = ImageCreateFromJpeg($src_path); // Check if png elseif ( stristr(strtolower($src_path),'.png')) $oldImage = ImageCreateFromPng($src_path); // Unknown file format else return DIR_WS_IMAGES.'pcs_images/'.'error3.jpg'; // Create the new image if(function_exists("ImageCreateTrueColor")){ $newImage = ImageCreateTrueColor(PCS_MAX_IMAGE_WIDTH,PCS_MAX_IMAGE_HEIGHT); }else{ $newImage = ImageCreate(PCS_MAX_IMAGE_WIDTH,PCS_MAX_IMAGE_HEIGHT); } $backgroundColor = imagecolorallocate($newImage,255,255,255); imagefill($newImage, 0, 0, $backgroundColor); // Calculate dimensions to which the image must be rezised; then resize if necessary if ( imagesx($oldImage) > PCS_MAX_IMAGE_WIDTH || imagesy($oldImage) > PCS_MAX_IMAGE_HEIGHT){ // Resize image if ( imagesx($oldImage)/PCS_MAX_IMAGE_WIDTH > imagesy($oldImage)/PCS_MAX_IMAGE_HEIGHT){ // Width is leading in beeing to large $newWidth = (int)PCS_MAX_IMAGE_WIDTH; $newHeight = (int)PCS_MAX_IMAGE_WIDTH/imagesx($oldImage)*imagesy($oldImage); } else { // Height is leading in beeing to large $newHeight = (int)PCS_MAX_IMAGE_HEIGHT; $newWidth = (int)PCS_MAX_IMAGE_HEIGHT/imagesy($oldImage)*imagesx($oldImage); } }else{ // Don't rezise image $newWidth = imagesx($oldImage); $newHeight = imagesy($oldImage); } // Copy the old image onto the new image ImageCopyResampled($newImage, $oldImage, PCS_MAX_IMAGE_WIDTH/2-$newWidth/2, PCS_MAX_IMAGE_HEIGHT/2-$newHeight/2, 0, 0, $newWidth, $newHeight, imagesx($oldImage), imagesy($oldImage)); imagejpeg($newImage,$strRet,PCS_IMAGE_QUALITY); // Save the image imagedestroy($oldImage); // Free Memory imagedestroy($newImage); // Free memory } return $strRet; } ?> <script type="text/javascript" src="includes/jquery-1.2.6.min.js"></script> <script type="text/javascript" src="includes/jquery.cycle.all.min.js"></script> <script type="text/javascript" src="includes/jquery.easing.1.3.js"></script> <script type="text/javascript"> function onPCS1Before() { $('#PCS1Output').animate({ opacity: 0.0 }, 1000 ); } function onPCS1After() { $('#PCS1Output').html($(this).attr("alt")); $('#PCS1Output').animate({ opacity: 1.0 }, 500 ); } $(document).ready(function(){ // Inizialize ProductsCycleSlideshow $('#PCS1').cycle({ fx: '<?php echo PCS_FX?>', <?php echo (PCS_EASING != 'None')? (" easing: '".PCS_EASING."',\n"):('');?> sync: <?php echo PCS_SYNC == 'true' ? '1' : '0';?>, speed: <?php echo PCS_SPEED;?>, timeout: <?php echo PCS_TIMEOUT;?>, pause: <?php echo PCS_PAUSE == 'true' ? '1' : '0';?>, random: <?php echo PCS_RANDOM == 'true' ? '1' : '0';?>, <?php echo (PCS_DISPLAY_BOXES == 'true')? (" pager: '#PCS1Pager',"):('');?> before: onPCS1Before, after: onPCS1After }); }); </script> <!-- start ProductCycleSlideshow --> <div class="ProductsCycleSlideshowWrapper"> <div id="PCS1" class="ProductsCycleSlideshow"> <?php /* use arrays with temp variables to get human-understandable and extensible code * Product types to display in the product cycle slide show are given a number $i * '0' => 'new_product', '1' => 'special_product', '2' => 'bestseller' * It is possible to extend the number of types of products with extra types (e.g. featured products?) * When extending number of types of products to display, make sure to extend the following 5 arrays! */ // Array $limit stores the required amount to display for each product-type $limit = array('0' => PCS_MAX_DISPLAY_NEW_PRODUCTS, '1' => PCS_MAX_DISPLAY_SPECIALS, '2' => PCS_MAX_DISPLAY_BESTSELLERS ); // Array $query[$i] defines the query to select products of type $i to display $query[] = array(); // Array $extra_where defines the product-type specific part of he WHERE clause $extra_where = array('0' => '1=1', '1' => 's.status = 1', '2' => '1=1' ); // Array $orderby defines the product-type specific part of he ORDER BY clause $orderby = array('0' => 'p.products_date_added desc', '1' => 'rand()', '2' => 'p.products_ordered desc, pd.products_name' ); // Array $box_hd stores the heading texts to display for each product-type $box_heading = array('0' => BOX_HEADING_WHATS_NEW, '1' => BOX_HEADING_SPECIALS, '2' => BOX_HEADING_BESTSELLERS ); for ($i=0, $n=sizeof($limit); $i<$n; $i++) { /* For each of the defined $selection_types: * Execute selection of products image, name, price(s); * Format and display information */ if ($limit[$i] > 0 ) { /* If any products of this $selection_type[$i] are required: * Select products of the $selection_type[$i], using the appropriate * extra query arguments */ $query[$i] = tep_db_query(" select distinct p.products_id, if (p.products_image_med IS NOT NULL, p.products_image_med, p.products_image) as products_image, p.products_tax_class_id, pd.products_name, p.products_price, s.status, s.specials_new_products_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and " . $extra_where[$i] . " order by " . $orderby[$i] . " limit " . $limit[$i] ); while ($display_product[$i] = tep_db_fetch_array($query[$i]) ) { /* For each of the selected products of $selection_type[$i]: * Assemble the link to the product_info page; * Assemble a text using the heading text for the $selection_type[$i] and the product name; * Assemble the price information with the appropriate formatting for (non) special prices */ $prod_link = tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $display_product[$i]['products_id']); $header_and_name = '<b>'.$box_heading[$i].'</b> - '.$display_product[$i]['products_name'].' '; // when s.status='1' we have a special product; in that case show both prices with special lay-out. if ($display_product[$i]['status']==1) { $price = '<span class="strike">'. $currencies->display_price($display_product[$i]['products_price'], tep_get_tax_rate($display_product[$i]['products_tax_class_id'])).'</span> '. '<span class="productSpecialPrice">'. $currencies->display_price($display_product[$i]['specials_new_products_price'], tep_get_tax_rate($display_product[$i]['products_tax_class_id']) ).'</span>'; } else { $price = $currencies->display_price($display_product[$i]['products_price'], tep_get_tax_rate($display_product[$i]['products_tax_class_id'])); } /* Now: display the product image, text, name and price */ ?> <div class="PCSChild"> <a href="<?php echo $prod_link; ?>"> <img src="<?php echo pcs_href_image(DIR_WS_IMAGES.$display_product[$i]['products_image']);?>" alt="<?php echo $display_product[$i]['products_name']; ?>" title="<?php echo $display_product[$i]['products_name']; ?>"> <?php echo $header_and_name . $price; ?> </a> </div> <?php } // end while ($display_product[$i] = tep_db_fetch_array($query[$i]) ) } // end if ($limit[$i] > 0 ) } // end for ($i=0, $n=sizeof($selection_types) ?> </div> <div id="PCS1Output" class="PCSOutput"></div> <!-- row of clickable numbered boxes, one for each product in PCS --> <div id="PCS1Pager" class="PCSPager"></div> </div> <!-- end of ProductCycleSlideshow --> This is my version of the lines to add to stylesheet.css: /*--- Beginning of Addition Products Cycle Slideshow ---*/ .slideshow { padding-left: 10px; } /* .ProductsCycleSlideshowWrapper { width: 504px; padding:0; margin:0; overflow: hidden; text-align:center;} .ProductsCycleSlideshow { height: 310px; width: 500px; padding:0; margin:0; overflow: hidden; border: 2px solid #bbc3d3; background-color:#fff;} .PCSChild { height: 296px; width: 486px; padding: 7px; text-align:center; top:0; left:0 } */ .PCSChild a { text-decoration: none; color: #000000; } .PCSChild a img { border: none; border-width: 0px; } .PCSOutput { text-align: left; font-size: 14px; } .PCSOutput a { text-decoration: none; color: #000000; } .PCSPager { margin: 7px; } .PCSPager a { border: 1px solid #bbc3d3; background: #ffffff; color: #bbc3d3; text-decoration: none; margin: 0 5px; padding: 3px 5px; font-size: 12px; } .PCSPager a.activeSlide { border: 1px solid #000000; background: #bbc3d3; color: #000000; } .PCSPager a:focus { outline: none; } .strike { text-decoration: line-through; } /*--- End of Addition Products Cycle Slideshow ---*/ This is how I changed index.php: </tr><!-- slideshow hieronder? //--> <?php /* --- Beginning of Addition Products Cycle Slideshow --- */ /*********** * Switch products_cycle_slideshow on or off with Status-switch configuration parameter from database * if (PCS_STATUS == 'false') PCS is off, * if (PCS_STATUS == 'true') PCS is on. ***********/ if (PCS_STATUS == 'true') { ?> <tr> <td class="main" align="center"><?php require(DIR_WS_MODULES . 'products_cycle_slideshow.php'); ?></td> </tr> <?php } else { /* Use next lines when Products Cycle Slideshow is off */ ?> <tr><td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td></tr> <tr> <td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td> </tr> <?php } /*--- End of Addition Products Cycle Slideshow ---*/ Here is my version of Install.sql # ===== Products Cycle Slideshow ===== # This SQL code will instert the configuration menu and it's keys. # As "DELETE FROM ... " is run before every entry this file can be run over the same database as many times as you like =) # This is good as it makes updating easy. # Future contributors; Please continue this tradition. # # 20110618 Denkster Changed: number for configuration_group = 17 (check if / make the number free!) # 20110619 Denkster Added: configuration_key PCS_STATUS, to switch module on/off # 20110713 Denkster Added: configuration_key PCS_DISPLAY_BOXES for admin to control display of boxes true/false # 20110714 Denkster Added: configuration_key PCS_MAX_IMAGE_HEIGHT and PCS_MAX_IMAGE_WIDTH, for admin to control image sizes # ==================== # Modify length in setfunction configuration group table ALTER TABLE `configuration` CHANGE `set_function` `set_function` VARCHAR( 2047 ); # Insert configuration group ####### NOTE: configuration group number changed from 99 to 17. Check if 17 is free! DELETE FROM configuration_group WHERE configuration_group_id=17; INSERT INTO configuration_group (configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible) VALUES (17, 'Products Slideshow', 'Configuration options for Products Cycle Slideshow', 17, 1); # Insert configuration parameters in group # # Added by Denkster # DELETE FROM configuration WHERE configuration_key='PCS_STATUS'; INSERT INTO configuration SET configuration_title='Enable Products Cycle Slideshow?', configuration_key='PCS_STATUS', configuration_value='false', configuration_description='Switch module Products Cycle Slideshow on of off.<br>True means ON, False means OFF.', configuration_group_id='17', sort_order='1', date_added=now(), use_function = NULL, set_function = 'tep_cfg_select_option(array(\'true\', \'false\'),'; DELETE FROM configuration WHERE configuration_key='PCS_DISPLAY_BOXES' INSERT INTO configuration SET configuration_title='Show a row of numbered boxes below product image?', configuration_key='PCS_DISPLAY_BOXES', configuration_value='false', .configuration_description='Show a clickable box for every product<br> in the Products Cycle Slideshow? Boxes will<br> appear in a horizontal row below the product<br> image and price. Boxes occupy verticaal space!<br> <b>true means show boxes, false means no boxes.</b>', configuration_group_id='17', sort_order='12', date_added=now(), use_function = NULL, set_function = 'tep_cfg_select_option(array(\'true\', \'false\'),'; DELETE FROM configuration WHERE configuration_key='PCS_MAX_IMAGE_HEIGHT' INSERT INTO configuration SET configuration_title='Maximum height available for image', configuration_key='PCS_MAX_IMAGE_HEIGHT', configuration_value='202', configuration_description='Image height in pixels.<br> Higher images will be resized to fit this maximum.<br> See also Maximum width available for image.', configuration_group_id='17', sort_order='13', date_added=now(), use_function = NULL, set_function = NULL; DELETE FROM configuration WHERE configuration_key='PCS_MAX_IMAGE_WIDTH' INSERT INTO configuration SET configuration_title='Maximum width available for image', configuration_key='PCS_MAX_IMAGE_WIDTH', configuration_value='382', configuration_description='Image width in pixels.<br> Wider images will be resized to fit this maximum.<br> See also Maximum height available for image', configuration_group_id='17', sort_order='14', date_added=now(), use_function = NULL, set_function = NULL; # # end added by Denkster DELETE FROM configuration WHERE configuration_key='PCS_IMAGE_QUALITY'; INSERT INTO configuration SET configuration_title='General - Image Quality', date_added=NOW(), sort_order='2', configuration_group_id=17, configuration_key='PCS_IMAGE_QUALITY', configuration_value='85', configuration_description='<p>Which quality should the images in the slideshow have? (1-100)</p>', use_function = NULL, set_function = NULL; DELETE FROM configuration WHERE configuration_key='PCS_MAX_DISPLAY_NEW_PRODUCTS'; INSERT INTO configuration SET configuration_title='Items - Number of New Products', date_added=NOW(), sort_order='3', configuration_group_id=17, configuration_key='PCS_MAX_DISPLAY_NEW_PRODUCTS', configuration_value='2', configuration_description='<p>How many new products should be in the slideshow?</p><p><b>Note:</b> This is the maximum value. If fewer products are found, the found ones will be used.</p>', use_function = NULL, set_function = NULL; DELETE FROM configuration WHERE configuration_key='PCS_MAX_DISPLAY_SPECIALS'; INSERT INTO configuration SET configuration_title='Items - Number of Specials', date_added=NOW(), sort_order='4', configuration_group_id=17, configuration_key='PCS_MAX_DISPLAY_SPECIALS', configuration_value='2', configuration_description='<p>How many specials should be in the slideshow?</p><p><b>Note:</b> This is the maximum value. If fewer products are found, the found ones will be used.</p>', use_function = NULL, set_function = NULL; DELETE FROM configuration WHERE configuration_key='PCS_MAX_DISPLAY_BESTSELLERS'; INSERT INTO configuration SET configuration_title='Items - Number of Bestsellers', date_added=NOW(), sort_order='5', configuration_group_id=17, configuration_key='PCS_MAX_DISPLAY_BESTSELLERS', configuration_value='2', configuration_description='<p>How many bestsellers should be in the slideshow?</p><p><b>Note:</b> This is the maximum value. If fewer products are found, the found ones will be used.</p>', use_function = NULL, set_function = NULL; DELETE FROM configuration WHERE configuration_key='PCS_SPEED'; INSERT INTO configuration SET configuration_title='FX - Transition Duration', date_added=NOW(), sort_order='5', configuration_group_id=17, configuration_key='PCS_SPEED', configuration_value='2000', configuration_description='<p>The duration of the transition in milliseconds</p>', use_function = NULL, set_function = NULL; DELETE FROM configuration WHERE configuration_key='PCS_TIMEOUT'; INSERT INTO configuration SET configuration_title='FX - Timeout (display time)', date_added=NOW(), sort_order='6', configuration_group_id=17, configuration_key='PCS_TIMEOUT', configuration_value='8000', configuration_description='<p>The time in milliseconds between transitions</p>', use_function = NULL, set_function = NULL; DELETE FROM configuration WHERE configuration_key='PCS_PAUSE'; INSERT INTO configuration SET configuration_title='General - Pause onMouseOver?', date_added=NOW(), sort_order='10', configuration_group_id=17, configuration_key='PCS_PAUSE', configuration_value='true', configuration_description='<p>Pause the slideshow on mouse over?</p>', use_function = NULL, set_function = 'tep_cfg_select_option(array(\'true\', \'false\'),'; DELETE FROM configuration WHERE configuration_key='PCS_FX'; INSERT INTO configuration SET configuration_title='FX - Transition FX', date_added=NOW(), sort_order='8', configuration_group_id=17, configuration_key='PCS_FX', configuration_value='scrollHorz', configuration_description='<p>Which transition FX should be used?</p>', use_function = NULL, set_function = 'tep_cfg_select_option(array(\'blindX\', \'blindY\', \'blindZ\', \'cover\', \'curtainX\', \'curtainY\', \'fade\', \'fadeZoom\', \'growX\', \'growY\', \'scrollUp\', \'scrollDown\', \'scrollLeft\', \'scrollRight\', \'scrollHorz\', \'scrollVert\', \'shuffle\', \'slideX\', \'slideY\', \'toss\', \'turnUp\', \'turnDown\', \'turnLeft\', \'turnRight\', \'uncover\', \'wipe\', \'zoom\'),'; DELETE FROM configuration WHERE configuration_key='PCS_EASING'; INSERT INTO configuration SET configuration_title='FX - Easing', date_added=NOW(), sort_order='9', configuration_group_id=17, configuration_key='PCS_EASING', configuration_value='None', configuration_description='<p>Which easing style should be used?</p>', use_function = NULL, set_function = 'tep_cfg_select_option(array(\'None\',\'easeInQuad\', \'easeOutQuad\', \'easeInOutQuad\', \'easeInCubic\', \'easeOutCubic\', \'easeInOutCubic\', \'easeInQuart\', \'easeOutQuart\', \'easeInOutQuart\', \'easeInQuint\', \'easeOutQuint\', \'easeInOutQuint\', \'easeInSine\', \'easeOutSine\', \'easeInOutSine\', \'easeInExpo\', \'easeOutExpo\', \'easeInOutExpo\', \'easeInCirc\', \'easeOutCirc\', \'easeInOutCirc\', \'easeInElastic\', \'easeOutElastic\', \'easeInOutElastic\', \'easeInBack\', \'easeOutBack\', \'easeInOutBack\', \'easeInBounce\', \'easeOutBounce\', \'easeInOutBounce\'),'; DELETE FROM configuration WHERE configuration_key='PCS_SYNC'; INSERT INTO configuration SET configuration_title='FX - Sync transitions?', date_added=NOW(), sort_order='10', configuration_group_id=17, configuration_key='PCS_SYNC', configuration_value='true', configuration_description='The sync option controls whether the slide transitions occur simultaneously. The default is true which means that the current slide transitions out as the next slide transitions in.', use_function = NULL, set_function = 'tep_cfg_select_option(array(\'true\', \'false\'),'; DELETE FROM configuration WHERE configuration_key='PCS_RANDOM'; INSERT INTO configuration SET configuration_title='General - Display randomly?', date_added=NOW(), sort_order='11', configuration_group_id=17, configuration_key='PCS_RANDOM', configuration_value='false', configuration_description='<p>Display the items in random order?</p>', use_function = NULL, set_function = 'tep_cfg_select_option(array(\'true\', \'false\'),';
  19. Right. Most solutions for PHP 5.3 deprecated functions are here: OSC V2.2 RC2a PHP 5.3 Compatible Files Or you might want to use OsC 2.3.1 instead. Eveline
  20. The only problem was the 500 server error when certain products are added to the cart, while some other products cause no error. I did not stop my quest for a usable combination of USU5 and 1032 Additional Images with Lightbox. And I found things. pid, pID, or products_id? Sloppy programming, culminating in use - in URL's - of several different variable names (pid, pID, products_id) for the same item, may be one cause of problems. In fact, application_top.php of Osc 2.2 rc 2a already has extra code build-in, to prevent the bad consequences of using pid and products_id in one URL: if ($HTTP_GET_VARS['action'] == 'buy_now') { $parameters = array('action', 'pid', 'products_id'); } else { $parameters = array('action', 'pid'); } Without this code, endless loops could occur. Bad use of tep_href_link() Another serious problem, affecting url-rewrite, is caused by wrong use of tep_href_link(). The forum about SEO headertags pointed that out. The parameters of the link belong after the comma, inside the brackets of tep_href_link() To be precise, I found three occurrences of that error in Javascript-fragments of product_info.php. I tried to correct them, but I'm not sure if all the quotes are in the right places. So please take care, when using this. document.write('<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image_pop']) . '"target="_blank" rel="lightbox[group]" title="'. $product_info['products_name'].'" >' . change to document.write('<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image_pop'], '"target="_blank" rel="lightbox[group]" title="'. $product_info['products_name']) .'" >' . and <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . (!empty($product_info['products_image_pop'])?$product_info['products_image_pop']:$product_info['products_image'])) . '" target="_blank" rel="lightbox[group]" title="'.$product_info['products_name'].'">' . change to <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . (!empty($product_info['products_image_pop'])?$product_info['products_image_pop']:$product_info['products_image']), '" target="_blank" rel="lightbox[group]" title="'.$product_info['products_name']).'">' . and <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . (!empty($product_info['products_image_pop'])?$product_info['products_image_pop']:$product_info['products_image'])) . '" target="_blank">' . change to <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . (!empty($product_info['products_image_pop'])?$product_info['products_image_pop']:$product_info['products_image']), '" target="_blank"').'">' .
  21. I can't help any more than I already have. The problem isn't with USU5 it is with your code or server. Re: your test server it needs mod_rewrite loaded in apache httpd.conf like:- LoadModule rewrite_module modules/mod_rewrite.so There is no redirect issue with USU5 so my guess would be that your configuration files are incorrect. There is a system in USU5 that 301 redirects old seo urls to the new version when you change e.g. a product name .. this uses configure.php settings and can result in a redirect loop if your configure files are incorrect. Thanks Robert, Of course you were right about what was wrong. Only we mortal creatures have difficulty finding the right solution for our wrongs, despite your directions.. Finally, I succeeded in getting USU5 working for my shop at my local server. The crucial lines in the file /catalog/includes/local/configure.php appeared to be these: define('HTTP_SERVER', 'http://127.0.0.1'); define('HTTP_COOKIE_DOMAIN', '127.0.0.1'); define('HTTP_COOKIE_PATH', '/de/catalog/'); define('DIR_WS_HTTP_CATALOG', '/de/catalog/'); define('DIR_FS_CATALOG', 'C:/Server/www/myserver.dev/public_html/catalog/' ); I access my shop at my local server through http://127.0.0.1/de/catalog/ the rewrite base for my shop at my local server is RewriteBase /de/catalog/
  22. Hi It seems Additional Images conflicts with Ultimate Search Engine Optimized Urls (USU5) Does anyone out there know if there is a solution? Please.. Eveline
  23. Hi Robert, Thanks for your answer I understand and respect that. A few more dozens of hours struggling later, I might have discovered which parts of code are a problem. Robert, would you please be so kind to examine the truth of my suspicions? JQuery conflicts with Lightbox? On http://www.shell-livewire.org/forums/archive/index.php/t-24929.html I found this: ( Bold by me, EB) So there seems to be some sort of conflict between USU and Lightbox? I use Additional Images too (Lightbox OFF, though) and Products Cycle Slideshow (among other addons). I've seen a remark from bksbeat on this forum that may point to the same problem. Ambiguous use of variable pID? And something else: I have the impression Additional Images uses a variable with the name pID for its pop-up images, while this variable is used as alternative for product_id as well. Robert, I would really appreciate it if you could shine your light on these ideas. Thanks again! Eveline
  24. Dear Robert, Thank you so much for taking time for me! I did that. After changing the .htaccess to your example (with the correct rewrite-base), I did reset the USU5-cache and cleared the browser cache, closed the browser and restarted the browser to retest But this 'clean' .htaccess made no change in my current problem situation. Maybe there is still another cache that I need to clear? These products can be added to the cart without error: 32, 35, 46, 72, 84 and 90. I can't find a common factor in which these product differ from all other products.. All other products result in the error 500, when added to cart with click on 'In Cart'. The urls look fine everywhere and all products ARE added to the cart, as can be seen after using the 'Back' button of the browser, to get from the error page to the last 'correct' page. I admit that promptly. But where should I look? Could it be Quantity Price Break Per Product (add-on 1242) that breaks the USU5? That is right. But these give the error again: yoursite.nl/winkel/muziekstandaard-p-71.html?action=add_product yoursite.nl/winkel/muziekstandaard-p-71.html?action=add_product&pID=71 I don't understand.. These are the details of my production server: - Shared server: FreeBSD 4.10-RELEASE-p2 - Database: MySQL 5.0.32-Debian_7etch10-log - HTTP server: Apache/1.3.42 (Unix) mod_gzip/1.3.26.1a mod_ssl/2.8.31 OpenSSL/0.9.7d - PHP versie: 5.2.17 (Zend: 2.2.0) I can't get the error logs from my provider. I can't get the rewrite thing working on my test-server (Windows Vista+Apache+PHP). That complicates the troubleshooting. Would you please help me understand where I have to look for my error? Thanks in advance, again.. kind regards Eveline
×
×
  • Create New...