Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Products Cycle Slideshow


Olof Larsson

Recommended Posts

i was thinkin if it is possible to choose to upload pictures for the slideshow, and then choose each pic to link to the product you want.. it would be great if it is possible

I am Maintaining :

Product_Short_Description (i added it on specials.php and in shopping_cart.php)

City Shipping Rates With Admin (fixed the error that was giving wrong total shipping charges)

I had Created :

UTF bug fix on standard reviews system (admin & block)

Corrupted character on mysql with utf-8

Link to comment
Share on other sites

  • Replies 146
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Hello Olof

 

I installed your contribution, v1.3a and all ican see is a white box with the product title description scrolling on the top. Under the white box, I can see the same description and image number buttons, but no image is to be seen. In IE, it shows a red "X" in a box, as imaage not found. It does show ERROR 1 in the image properties.

Where is it looking for the images? CATALOG/IMAGES folder? I do have an image "sub-directory' modification installed. Could that be causing the problem?

 

Thank you!

 

'Rexx

Link to comment
Share on other sites

Hello Olof

 

I installed your contribution, v1.3a and all ican see is a white box with the product title description scrolling on the top. Under the white box, I can see the same description and image number buttons, but no image is to be seen. In IE, it shows a red "X" in a box, as imaage not found. It does show ERROR 1 in the image properties.

Where is it looking for the images? CATALOG/IMAGES folder? I do have an image "sub-directory' modification installed. Could that be causing the problem?

 

Thank you!

 

'Rexx

 

Yeah could be. Check in the products_cycle_slideshow.php. You can find the text error1 there. I don't have time to explain the solution for you but somewhere you call pcs_href_image($src_path) and $src_path does not exist.

Good luck.

Link to comment
Share on other sites

hi everybody,

 

i got the same problem. I have sts template install. does anybody know how to fix this.

www.signartistic.com/catalog

 

Thanks,

 

NL

 

edit your products_cycle_slideshow.php

 

find

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';

 

change to

function pcs_href_image($src_path){
$strRet = DIR_WS_IMAGES.'/'.basename($src_path).'_'.PCS_MAX_IMAGE_HEIGHT.'_'.PCS_MAX_IMAGE_WIDTH.'_'.PCS_IMAGE_QUALITY.'.jpg';

Link to comment
Share on other sites

hello everybody.

 

i got this contri working, it is very nice; however, the flash (box) cover the sub-categories. Does any body know how to fix this, please help.

 

I haves sts template installed.

 

www.signartistic.com/catalog.

 

move the mouse over the categories.

the flash box cover the sub-categories.

 

 

Thanks,

 

NL

Link to comment
Share on other sites

hello everybody.

 

i got this contri working, it is very nice; however, the flash (box) cover the sub-categories. Does any body know how to fix this, please help.

 

I haves sts template installed.

 

www.signartistic.com/catalog.

 

move the mouse over the categories.

the flash box cover the sub-categories.

 

 

Thanks,

 

NL

 

Tibolam, i just had a look and your menu sits on top of your product box ( then box in the middle that is rotating products, which is what i presume you meant by your flash box)

 

 

im am viewing using IE7

Link to comment
Share on other sites

edit your products_cycle_slideshow.php

 

find

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';

 

change to

function pcs_href_image($src_path){
$strRet = DIR_WS_IMAGES.'/'.basename($src_path).'_'.PCS_MAX_IMAGE_HEIGHT.'_'.PCS_MAX_IMAGE_WIDTH.'_'.PCS_IMAGE_QUALITY.'.jpg';

 

 

Awesome contribution. Having same problem, images do not appear with same "Error1". Above suggestion did not help. I'm not using a template system. I'm on RC2a, PHP 5, MySQL 5.0.

 

I do not understand the purpose of this boldfaced section of `products_cycle_slideshow.php`, Line 13:

 

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.

Any other ideas or suggestions?

Link to comment
Share on other sites

Nev Version online! 1.3b

 

Authors: "Olof Larsson"

 

New in this version:

 

* Bugfix. In previous version i forgott to add the folder catalog/images/pcs_images. This empty foler is added now and that's the only change. For you who experienced a slideshow without images this is the solution. Sorry ^^

Link to comment
Share on other sites

I created a directory called /images/pcs_images several days ago when you replied. I even moved a few images into that folder and still see no images, only text scrolling across the top. Even tried giving the folder full permissions, with no difference.

Any suggestions?

 

'Rex

 

 

 

 

Yeah could be. Check in the products_cycle_slideshow.php. You can find the text error1 there. I don't have time to explain the solution for you but somewhere you call pcs_href_image($src_path) and $src_path does not exist.

Good luck.

Link to comment
Share on other sites

Nev Version online! 1.3b

 

Authors: "Olof Larsson"

 

New in this version:

 

* Bugfix. In previous version i forgott to add the folder catalog/images/pcs_images. This empty foler is added now and that's the only change. For you who experienced a slideshow without images this is the solution. Sorry ^^

 

 

Thanks for the quick response. It turns out the `pcs_images` folder was not the problem. In my case, the `images` folder was located at a remote domain. Once restored back to the default `../catalog/images` the images appeared. Still having that problem with left side categories menu flying *behind* slide-show box, and would rather it flew above. Don't know if there is a solution.

Link to comment
Share on other sites

hello there,

 

i just reinstalled the oscommerce and installed

b2b, sts template, product cycle slideshow

 

the flash box works very good but the price didn't show up correctly.

i copied all the files over and not modified anything, except the images path

 

please check out this website and please help

 

www.signartistic.com/catalog

 

NL

Link to comment
Share on other sites

Wow-I really love the slide show, I plan to install it on my site. I read the install instructions, but I'm concerned I did not see anything explaining how to install the admin part. There are no admin install files in the ZIP, usually when I install modules there are some sort of admin files to modify-Just how does that part work?

 

The instructions say "In the configuration admin panel you now have some options under the configuration menu "Products Slideshow". There you can decide how many New Products, Specials and Bestsellers should be in the slideshow."

 

How do these configuration options get into the admin without modifying in the install? Does it get installed through the sql file? I'm still new to OSCOMMERCE, so I guess I just need some re-assurance before I go through with the install. How does the admin feature of this module exactly work? :blink:

 

thanks,

Nick T.

honusurf.com

Link to comment
Share on other sites

How do these configuration options get into the admin without modifying in the install? Does it get installed through the sql file? I'm still new to OSCOMMERCE, so I guess I just need some re-assurance before I go through with the install. How does the admin feature of this module exactly work? :blink:

 

exactly! :)

I am Maintaining :

Product_Short_Description (i added it on specials.php and in shopping_cart.php)

City Shipping Rates With Admin (fixed the error that was giving wrong total shipping charges)

I had Created :

UTF bug fix on standard reviews system (admin & block)

Corrupted character on mysql with utf-8

Link to comment
Share on other sites

Hi,

 

I would like to know how to change the request to be able to view all products (whole catalog) randomly.

 

Thanks,

 

 

################################ ORIGINAL ########################################

 

<?php

/*

Products Cycle Slideshow

Copyright © 2008 Olof Larsson

Released under the GNU General Public License

*/

 

#These values should not be modified. More in the CSS will need to be changed in such case.

define('PCS_MAX_IMAGE_HEIGHT', 292);

define('PCS_MAX_IMAGE_WIDTH', 482);

 

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.

 

if(!file_exists($strRet)){ #Create the file if it does not exist

#check to see if source file exists

if(!file_exists($src_path)) {

return 'error1';

}

#check to see if source file is readable

elseif(!is_readable($src_path)) {

return 'error2';

}

#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 'error3';

 

#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 the rezised image's dimmensions

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' ? "\n 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' ?>,

pager: '#PCS1Pager',

before: onPCS1Before,

after: onPCS1After

});

 

});

</script>

 

<div class="ProductsCycleSlideshowWrapper">

<div id="PCS1" class="ProductsCycleSlideshow">

 

<?php

/*Pick news*/

$new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, pd.products_name, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added desc limit " . PCS_MAX_DISPLAY_NEW_PRODUCTS);

 

while ($new_product = tep_db_fetch_array($new_products_query)) {

echo '<div class="PCSChild" alt="'. htmlspecialchars(html_entity_decode('<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_product['products_id']) . '"><b>'.BOX_HEADING_WHATS_NEW.'</b>  -  '.$new_product['products_name'].'<br />'.$currencies->display_price($new_product['products_price'], tep_get_tax_rate($new_product['products_tax_class_id'])).'</a>')) .'"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_product['products_id']) . '"><img src="'.pcs_href_image(DIR_WS_IMAGES.$new_product['products_image']).'" alt="'.$new_product['products_name'].'" ></a></div>';

}

?>

 

<?php

/*Pick specials*/

$special_products_query = tep_db_query("select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_status = '1' and p.products_id = s.products_id and pd.products_id = s.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' order by rand() limit " . PCS_MAX_DISPLAY_SPECIALS);

 

while ($special_product = tep_db_fetch_array($special_products_query)) {

echo '<div class="PCSChild" alt="'. htmlspecialchars(html_entity_decode('<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $special_product['products_id']) . '"><b>'.BOX_HEADING_SPECIALS.'  -  </b>'.$special_product['products_name'].'<br /><s>'.$currencies->display_price($special_product['products_price'], tep_get_tax_rate($special_product['products_tax_class_id'])).'</s> <span class="productSpecialPrice">'.$currencies->display_price($special_product['specials_new_products_price'], tep_get_tax_rate($special_product['products_tax_class_id'])).'</span></a>')) .'"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $special_product['products_id']) . '"><img src="'.pcs_href_image(DIR_WS_IMAGES.$special_product['products_image']).'" alt="'.$special_product['products_name'].'"></a></div>';

}

?>

 

<?php

/*Pick bestsellers*/

$best_sellers_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, pd.products_name, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_ordered desc, pd.products_name limit " . PCS_MAX_DISPLAY_BESTSELLERS);

 

while ($best_seller = tep_db_fetch_array($best_sellers_query)) {

echo '<div class="PCSChild" alt="'. htmlspecialchars(html_entity_decode('<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $best_seller['products_id']) . '"><b>'.BOX_HEADING_BESTSELLERS.'  -  </b>'.$best_seller['products_name'].'<br />'.$currencies->display_price($best_seller['products_price'], tep_get_tax_rate($best_seller['products_tax_class_id'])).'</a>')) .'"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $best_seller['products_id']) . '"><img src="'.pcs_href_image(DIR_WS_IMAGES . $best_seller['products_image']).'" alt="'.$best_seller['products_name'].'"></a></div>';

}

?>

</div>

<div id="PCS1Output" class="PCSOutput"></div>

<div id="PCS1Pager" class="PCSPager"></div>

</div>

Link to comment
Share on other sites

  • 3 weeks later...

Thank you very much contrib works great, but if its possible it would be very nice to be able to change the quantity of goods showing in the same time, now it could be the only one... for me it would be useful for header:

 

3.4.5... products in the same time in a box and sliders on the left and the right sides of the box

Link to comment
Share on other sites

I'm still having problems with no images showing up :( Just the text sliding nicely by lol.

 

I have the images/pcs_images folder there (I have everything in my public_html folder, I don't have a separate catalog folder), and everything else looks correct - any ideas what else could be wrong?

 

Thanks for your help!

Link to comment
Share on other sites

  • 1 month later...
  • 4 weeks later...

hello every one

 

i installed sts temple to the my site. now i want to install this contribution; however, the template is in html format (index.php.html) in sts_template/full folder.

 

when added <?php require(DIR_WS_MODULES . 'products_cycle_slideshow.php'); ?> to this file, it only show the bottom part (What's New Here ....) only

and i added <iframe frameborder="0" align="middle" scrolling="no" src="includes/modules/products_cycle_slideshow.php"></iframe>, then it didn't show any thing inside this iframe.

 

does any body know how to this contribution with sts template (not modernrc2)?

 

here my link

http://signartistic.com/catalog2

 

please help

 

thanks

 

Nam

Link to comment
Share on other sites

Hello friends, its posible choose the image height and width in the admin panel?

 

 

That would be a nice feature. Would that be to hard to implement??

Also it would be nice to be able to activate/deactivate the slideshow on the admin.

Any chances in getting this done?

 

Thank you for such a great contribution. Very nice an useful. :)

Edited by Patty

Patty

Link to comment
Share on other sites

  • 2 months later...
That would be a nice feature. Would that be to hard to implement??

Also it would be nice to be able to activate/deactivate the slideshow on the admin.

Any chances in getting this done?

 

Thank you for such a great contribution. Very nice an useful. :)

 

 

I would also like to see this feature added as well.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...