Jump to content



Photo
* * * * * 1 votes

Products Cycle Slideshow


  • Please log in to reply
144 replies to this topic

#41   smiler99

smiler99
  • Members
  • 59 posts
  • Real Name:chris
  • Gender:Male

Posted 04 October 2008 - 21:37

ammendment to the above, most other pages dont get the script headers, to fix this i have added the 2 scripts lines to my sts template page just below $headcontent

$headcontent
<script type="text/javascript" src="js/jquery-1.2.6.js"></script>
<script type="text/javascript" src="js/jquery.cycle.all.pack.js"></script>

#42   smiler99

smiler99
  • Members
  • 59 posts
  • Real Name:chris
  • Gender:Male

Posted 05 October 2008 - 01:53

** We all live and learn ** - Please not i am by no means an expert, i knew nothing about PHP or OSC before i installed OSC in August 08. Please note you will not have this problem if you simply follow the instructions in the contrib, however if you do just follow the instructions in this contrib your slideshow will not work on every page that you have it on. - the 2 script lines need to be added to page that will be included on ALL your pages containing the slideshow, as mentioned earlier and below, i have mine in my STS template page

I have Found further issues with a conflict of Javascript prototype clashes with Jquery, JQuery is widely referenced as $ this contrib therefore clashes with other contribs containing javascript and needs to be re-referenced to remove this conflict, ( i believe it is the Prototype.js that is causing issue)

at the bottom of each of the 3 files you modified or copied over

Specials.php
Whats_new.php
Best_sellers.php

you will find the following code similar to the following (may differ slightly due to how you have configured your slideshows)

<script type="text/javascript">
$(function(){
$('#BSContainer').cycle({
fx: 'fade',
pause: 1,
delay: 2000
});
});
</script>

what you are looking for is to change the $(function(){ and the $('#BSContainer) changed both $ to $J, do this for all 3 PHP files

it should now look like this

<script type="text/javascript">
$J(function(){
$J('#BSContainer').cycle({
fx: 'fade',
pause: 1,
delay: 2000
});
});
</script>


NOW Part 2, wherever you have added your Script lines (i have mine in my head section of my STS template) Immediatly below them add the folowing highlighted in RED


<script type="text/javascript" src="/catalog/js/jquery-1.2.6.js"></script>
<script type="text/javascript" src="/catalog/js/jquery.cycle.all.pack.js"></script>
<script> var $j = jQuery.noConflict(); </script>

Appears to work perfectly!! - fireplace2u.co.uk

Smiler

#43   Olof Larsson

Olof Larsson
  • Members
  • 91 posts
  • Real Name:Olof Larsson
  • Gender:Male
  • Location:Sweden

Posted 05 October 2008 - 07:38

Good Contrib, installed easy, i have 10+ major contrib installed already and luckily none had used the 3 main files that need to be edited / replaced, however i think i have noticed 1 typo which doesnt seem to cause an issue but thought i would flag it anyway.

\catalog\includes\boxes\best_sellers.php in the original has a $, in replacement does not, as shown below

$current_category_id >0)){ _linenums:0'>if (isset($current_category_id) && (<strong class='bbc'>$</strong>current_category_id >0)){

Also

when you go into product info page, the Javascript sources do not get loaded, and the slideshow does not work, unsure if i missed something or have a modofies index.php which causes the issue but i fixed it by adding the javascript sources into catalog\product_info.php

<script type="text/javascript" src="js/jquery-1.2.6.js"></script>
<script type="text/javascript" src="js/jquery.cycle.all.pack.js"></script>

** please note may not have all these scripts installed but the above indicates roughly where you should place the new lines)

_linenums:0'>//--></script><script type="text/javascript" src="js/prototype.js"></script><script type="text/javascript" src="js/scriptaculous.js?load=effects"></script><script type="text/javascript" src="js/lightbox.js"></script><script type="text/javascript" src="js/builder.js"></script><script type="text/javascript" src="js/jquery-1.2.6.js"></script><script type="text/javascript" src="js/jquery.cycle.all.pack.js"></script>** please note may not have all these scripts installed but the above indicates roughly where you should place the new lines)

see this contrib in action here - fireplace2u.co.uk

(still work in progress)


Prototype and Jquery may work bad together as they both use the function name '$'.
To not miss things in installations; use Beyond Compare ^^

#44   smiler99

smiler99
  • Members
  • 59 posts
  • Real Name:chris
  • Gender:Male

Posted 05 October 2008 - 10:09

Olaf,

Not sure if you mis interpreted my replies,

i installed the contrib perfectly, nothing got missed, however the instructions leave problems that needs to be fixed as explained above. the slideshow does not work on all pages unless you install the fix and re-assign the $ to another variable, once done this work perfect, i believe those adjustments should be added back into the contrib and a revised edition uploaded (if you agree and validate what i have said, i dont have time at this point to do that but may do in the future).

#45   Olof Larsson

Olof Larsson
  • Members
  • 91 posts
  • Real Name:Olof Larsson
  • Gender:Male
  • Location:Sweden

Posted 06 October 2008 - 20:10

Olaf,

Not sure if you mis interpreted my replies,

i installed the contrib perfectly, nothing got missed, however the instructions leave problems that needs to be fixed as explained above. the slideshow does not work on all pages unless you install the fix and re-assign the $ to another variable, once done this work perfect, i believe those adjustments should be added back into the contrib and a revised edition uploaded (if you agree and validate what i have said, i dont have time at this point to do that but may do in the future).


Sorry, I missed some posts you wrote. /rolleyes.gif' class='bbc_emoticon' alt=':rolleyes:' /> sorry. My bad.
Yes, to use var $j = jQuery.noConflict(); is a solution. However other contributions might use jquery in it's $ form... Perhaps usage of var $j = jQuery.noConflict(); will make this contribution unusable with other contributions...

#46   patrickb42

patrickb42
  • Members
  • 18 posts
  • Real Name:Patrick
  • Gender:Male
  • Location:France

Posted 09 October 2008 - 08:55

Hello,
I've searched how to delete the white background underneath each image, but couldn't guess how : int CSS, int the cyle js file, it's always remaining white.
Why,

Thanks a lot
Patrick

#47   Olof Larsson

Olof Larsson
  • Members
  • 91 posts
  • Real Name:Olof Larsson
  • Gender:Male
  • Location:Sweden

Posted 09 October 2008 - 09:29

Hello,
I've searched how to delete the white background underneath each image, but couldn't guess how : int CSS, int the cyle js file, it's always remaining white.
Why,

Thanks a lot
Patrick


The white color is in the css and in each generated jpg image. JPG does not support transparency. You would have to reprogramm the code to use PNG with transparency and change the CSS ^^

#48   koollayed

koollayed
  • Members
  • 32 posts
  • Real Name:tom white

Posted 12 October 2008 - 14:29

Great add on. Is it possible to not have the images resize and or adjust the size of the image?

#49   Olof Larsson

Olof Larsson
  • Members
  • 91 posts
  • Real Name:Olof Larsson
  • Gender:Male
  • Location:Sweden

Posted 12 October 2008 - 17:58

Great add on. Is it possible to not have the images resize and or adjust the size of the image?


Currently not supported by the contribution... Why would you want to do that? /rolleyes.gif' class='bbc_emoticon' alt=':rolleyes:' />
Reasons Not to simply adjust size:
*Browser resized images look ugly in most browsers
*Image size is larger

#50   jnjn

jnjn
  • Members
  • 13 posts
  • Real Name:josé Neves
  • Gender:Male
  • Location:Portugal

Posted 13 October 2008 - 23:26

Great add on. Is it possible to not have the images resize and or adjust the size of the image?

I
if you have the cont 3 pictures for the produt, you have products_image; products_image_med and products_image_pop.
try replace in the products_cycle_slideshow.php all products_image for products_image_med.

And when you enter the picture in the product you can control the image size
jn

#51   draculakos

draculakos
  • Members
  • 86 posts
  • Real Name:Christoforos
  • Gender:Male
  • Location:Greece

Posted 20 October 2008 - 20:01

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

#52   rexx

rexx
  • Members
  • 16 posts
  • Real Name:Rexx

Posted 21 October 2008 - 09:50

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

#53   Olof Larsson

Olof Larsson
  • Members
  • 91 posts
  • Real Name:Olof Larsson
  • Gender:Male
  • Location:Sweden

Posted 21 October 2008 - 17:58

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.

#54   tibolam

tibolam
  • Members
  • 13 posts
  • Real Name:Nam Lam

Posted 22 October 2008 - 16:59

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

#55   abenk

abenk
  • Members
  • 4 posts
  • Real Name:abenk

Posted 23 October 2008 - 02:26

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


#56   tibolam

tibolam
  • Members
  • 13 posts
  • Real Name:Nam Lam

Posted 23 October 2008 - 06:30

it works now, thanks alot

#57   tibolam

tibolam
  • Members
  • 13 posts
  • Real Name:Nam Lam

Posted 25 October 2008 - 18:40

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

#58   smiler99

smiler99
  • Members
  • 59 posts
  • Real Name:chris
  • Gender:Male

Posted 25 October 2008 - 20:49

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

#59   goldcoastafrica

goldcoastafrica
  • Members
  • 9 posts
  • Real Name:Scott

Posted 26 October 2008 - 01:13

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?

#60   Olof Larsson

Olof Larsson
  • Members
  • 91 posts
  • Real Name:Olof Larsson
  • Gender:Male
  • Location:Sweden

Posted 26 October 2008 - 09:11

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 ^^