Jump to content


Corporate Sponsors


Latest News: (loading..)

* * * * * 1 votes

Products Cycle Slideshow


136 replies to this topic

#121 racefun

  • Community Member
  • 5 posts
  • Real Name:Keld
  • Gender:Male
  • Location:Denmark

Posted 04 March 2011, 09:47

Hi Mogens

It could help if you did translate it to english, we are very few understanding Danish in here <_<

but try to look in the code, in lini 211 they code ask for a sign and thats the problem.

#122 jutee

  • Community Member
  • 5 posts
  • Real Name:ghetto jutee

Posted 04 March 2011, 22:07

great contrib!!!

i will no more force my best selling product, because it's too old. but i will still have it in shop. is there a possibility to not show it on bestsellers? mean, to comment out a product for this contribution?

thx for answering

#123 Xpajun

  • Community Member
  • 1,272 posts
  • Real Name:Julian
  • Gender:Male
  • Location:UK

Posted 07 March 2011, 08:47

View Postcristianxb1983, on 28 February 2011, 04:04, said:

Step by STep procedure completed but nothing is showing... just white. Not even white images with links... nothing. I am doing something wrong thats for sure... But cant figure out what is it?


Cristian,

The box will show white when there are no images for the program to load, that would point to the set up in admin is wrong or you have no best sellers, new products or specials.

With a new store you won't get a best seller without buying something, try loading up some new products as well...

#124 Xpajun

  • Community Member
  • 1,272 posts
  • Real Name:Julian
  • Gender:Male
  • Location:UK

Posted 07 March 2011, 09:01

View Postjutee, on 04 March 2011, 22:07, said:

great contrib!!!

i will no more force my best selling product, because it's too old. but i will still have it in shop. is there a possibility to not show it on bestsellers? mean, to comment out a product for this contribution?

thx for answering


I would suppose it is possible but would it be worth it? You certainly do not have to show any of your best sellers just concentrate on new products and specials, mind you, if you have 10 of each showing, your top best seller is only going to show 1 in 30 times - about once every 4 minutes - would your customers stay on your index page for 4 minutes?

#125 maxnut

  • Community Member
  • 14 posts
  • Real Name:rich
  • Gender:Male

Posted 06 April 2011, 13:49

I have just installed this on my website and the admin shows everything up ok... i am running 2.3.1...

it doesnt scroll and i have changed the admin settings to do so...

http://www.getmaxxed.com

it looks like a page error and the error code says "object doesnt support this property or method"

any ideas?

please help... thanks
OSC Version 2.3.1

Add ons installed:

Coupons
SEO URLS 5
Fedex Ship
USPS
Paypal Express
Slideshow

#126 Xpajun

  • Community Member
  • 1,272 posts
  • Real Name:Julian
  • Gender:Male
  • Location:UK

Posted 06 April 2011, 17:33

You haven't uploaded the contents of the catalog folder in their respective places

catalog/imagess/pc_images (new folder)
catalog/includes/jquery-1.2.6.min.js
catalog/includes/jquery.cycle.all.min.js
catalog/includes/jquery.easing.1.3.js
catalog/images/modules/products_cycle_slideshow.php

#127 maxnut

  • Community Member
  • 14 posts
  • Real Name:rich
  • Gender:Male

Posted 06 April 2011, 17:52

View PostXpajun, on 06 April 2011, 17:33, said:

You haven't uploaded the contents of the catalog folder in their respective places

catalog/imagess/pc_images (new folder)
catalog/includes/jquery-1.2.6.min.js
catalog/includes/jquery.cycle.all.min.js
catalog/includes/jquery.easing.1.3.js
catalog/images/modules/products_cycle_slideshow.php


Thanks alot Xpajun!!!!

I actually just uploaded the jquery files to the modules folder instead of the includes folder... thanks for the eye!!!
OSC Version 2.3.1

Add ons installed:

Coupons
SEO URLS 5
Fedex Ship
USPS
Paypal Express
Slideshow

#128 maxnut

  • Community Member
  • 14 posts
  • Real Name:rich
  • Gender:Male

Posted 06 April 2011, 18:08

Is there a way to change the left over background to another color other than white?

i changed the 255,255,255 to 0,0,0 in the product_cycle_slideshow filebut nothing happened...

www.getmaxxed.com

also, is the a way to change the fonts that list new product or best seller and such?

thanks,
rich
OSC Version 2.3.1

Add ons installed:

Coupons
SEO URLS 5
Fedex Ship
USPS
Paypal Express
Slideshow

#129 Denkster

  • Community Member
  • 64 posts
  • Real Name:Eveline Bernard

Posted 24 June 2011, 19:54

Thanks, moderators,
For removing my erroneous contributions to this thread.

Eveline

#130 Denkster

  • Community Member
  • 64 posts
  • Real Name:Eveline Bernard

Posted 24 June 2011, 20:08

PennyP on 20 November 2009, 23:08 said:

Can someone please tell me how to get rid of the ??-?? (in black diamonds) between the category and product text on the slideshow??!! I really love this contribution but the diamonds must G-O! :'(

I know that you have a solution, PennyP, but I'd like to add something that maybe useful for everybody.

The original code of /catalog/includes/modules/product_cycle_slideshow.php contains (in three places) the PHP functions
htmlspecialchars() and html_entity_decode().

The PHP manual says about these functions:

PHP manual said:

Description
string html_entity_decode ( string $string [, int $quote_style = ENT_COMPAT [, string $charset = 'UTF-8' ]] )
html_entity_decode() is the opposite of htmlentities() in that it converts all HTML entities to their applicable characters from string.
and

PHP manual said:

Description

string htmlspecialchars ( string $string [, int $flags = ENT_COMPAT [, string $charset [, bool $double_encode = true ]]] )
Certain characters have special significance in HTML, and should be represented by HTML entities if they are to preserve their meanings. This function returns a string with some of these conversions made; the translations made are those most useful for everyday web programming. If you require all HTML character entities to be translated, use htmlentities() instead.

This function is useful in preventing user-supplied text from containing HTML markup, such as in a message board or guest book application.

As you can see, both htmlspecialchars() and html_entity_decode() have three parameters
  • The string to work on $string,
  • A flag to indicate the way it works ($flags and $quote_style)
  • The character set it is supposed to work with: $charset.

The functions allow us to use specify any character set.
So, with these functions, we can use "UTF-8", "ISO-8859-1", or whatever is valid.

But there is an even better solution.
The character set, that your OsCommerce works with, is registered in the configurable parameter CHARSET.
The parameter CHARSET is used in the header of every OsC HTML-file, in this way:

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

We can use this parameter in the Product Cycle Slideshow, like this:

$data2 =  html_entity_decode($data1,  ENT_COMPAT,  CHARSET);      
$data3 =  htmlspecialchars($data2,  ENT_COMPAT,  CHARSET); 

Add CHARSET parameter too solve character set problems
Using this knowledge, we can correct the three lines, that contain these functions, in such a way, that these lines of code will not cause anymore problems with character sets in any OsC implementation anywhere.


The above text was the better part of my former (deleted) messages. I hope this is useful for someone.
Eveline

#131 Dakou

  • Community Member
  • 3 posts
  • Real Name:medakou sar

Posted 22 July 2011, 09:33

View Postcristianxb1983, on 28 February 2011, 04:04, said:

Step by STep procedure completed but nothing is showing... just white. Not even white images with links... nothing. I am doing something wrong thats for sure... But cant figure out what is it?


Hi Christian,

Im new to this and having the same problem. Have you sorted it out? if you have , can you please let me know too? Thanks

#132 Denkster

  • Community Member
  • 64 posts
  • Real Name:Eveline Bernard

Posted 24 July 2011, 23:21

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:
Attached File  Admin_PCS.PNG   46.8K   18 downloads

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>&nbsp;- '.$display_product[$i]['products_name'].'&nbsp;&nbsp;';
        
        // 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>&nbsp;'.
                    '<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\'),';


#133 Denkster

  • Community Member
  • 64 posts
  • Real Name:Eveline Bernard

Posted 24 July 2011, 23:39

View PostDenkster, on 24 July 2011, 23:21, said:

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.
I need to tell you, one of the ideas I used comes from Korben83:
http://forums.oscommerce.com/topic/315453-products-cycle-slideshow/page__view__findpost__p__1525821

Thanks

Eveline

#134 trotterman

  • Community Member
  • 3 posts
  • Real Name:Seb

Posted 29 July 2011, 02:31

View PostPennyP, on 25 November 2009, 02:27, said:

For anyone looking for a solution to this problem, it was the encoding. I emailed my hosting company with my concerns and this is how they responded. "PHP was generating your pages with a UTF-8 character set and the characters in your code were in a different charset. I edited your php.ini and modified your default charset to Western ISO-8859-1. This seems to have caused the browser to display the characters correctly."

Hope this helps some of you!
Ciao,
Penny :P


Another solution is to remove all "&nbsp;" in bm_product_cycle_slideshow.php file and replace it with a new line "</br>" after the </b>

I had the same problem and that worked for me.

#135 LDeeJay

  • Community Member
  • 3 posts
  • Real Name:Leon

Posted 17 November 2011, 18:55

Fantastic add-on! However (why is there always one?).....

I can only get it to work on the left of right side (as can be selected in the control panel). But I'd like this one to replace the 'New Products for...' on my frontpage and category pages.

I know I have to replace or modify the <?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?> statement in the index.php multiple times to get that effect and with some effort I can make it switched on/off depending on the true/false value but what I can't seem to get is the statement that should replace the NEW_PRODUCTS.

Anyone who can give me a push in the right direction? I have a fairly basic OsC 2.3.1 version.

Thanks for your time.

Léon

#136 jaysan

  • Community Member
  • 7 posts
  • Real Name:bn prokhal

Posted 20 November 2011, 05:18

i m also trying to replace with New_Products .with Product cycle slide show .. i try basic and some change but it's not working .. ..if any buddy Know help me out it will great .. thanks advance

#137 LDeeJay

  • Community Member
  • 3 posts
  • Real Name:Leon

Posted 21 November 2011, 21:08

I finally got it working. Not the prettiest solution (programmatically) but it works. Here's what I did:
  • Install the newest version (2.3.1_1) according to the documentation. Activate the plugin and set the variables as desired. The slideshow will pop-up at either the left of right sidebar. Then, set Enable Products Cycle Slideshow Module to False and it will disappear. But the module is still used for configuring the appearance of the slideshow.
  • Copy the files from the 1.4 version to the folders according to that installation (that one doesn't go into the /boxes but in modules). This will eventually be the file that is going to be used.
  • Edit index.php and replace
<?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?>
with

<?php require(DIR_WS_MODULES . 'products_cycle_slideshow.php'); ?>

It occurs twice. First time is for the category pages, second time (almost at the end) for the 'home-page'.

You can see the result at my site (in development).

Once I've figured out how to combine functionality from both files I'll clean them up and put them in one. What I haven't figured out yet is how to refer to the /boxes folder instead of /modules. Changing paths and adding them in filenames.php didn't work so far.

Questions? Just ask.

Good luck!

Edited by LDeeJay, 21 November 2011, 21:08.