Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Just cant get dynamicDrive scripts to work

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #11  
Old 02-26-2010, 11:09 AM
  gizmo's Avatar 
gizmo gizmo is offline
 

X-Adept
  
Join Date: Jan 2005
Location: Crawley : UK
Posts: 618
 

Default Re: Just cant get dynamicDrive scripts to work

I gather your using this one > http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm

Can you just confirm
__________________
Thank You - Alan
Don't be like me, and keep saying "Nearly did it" go do it!!
Version: 4.4.4 Gold -
Reply With Quote
  #12  
Old 02-26-2010, 11:17 AM
 
manishp manishp is offline
 

Advanced Member
  
Join Date: Jul 2009
Posts: 41
 

Default Re: Just cant get dynamicDrive scripts to work

Quote:
Originally Posted by gizmo
I gather your using this one > http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm

Can you just confirm

Hi gizmo

That is the correct URL for the script on Dynamic Drive.

Thanks a lot.
__________________
X-Cart: 4.2.1
Reply With Quote
  #13  
Old 02-26-2010, 11:18 AM
  gb2world's Avatar 
gb2world gb2world is offline
 

X-Wizard
  
Join Date: May 2006
Location: Austin, TX
Posts: 1,970
 

Default Re: Just cant get dynamicDrive scripts to work

Quote:
The only thing i can think now is that the images can't be found. Since I am following the {literal} tags approach, does this mean i have to give the entire path of the images like http:\www.myserver...images.jpg? or can i still access it using a relative path?

The literal tags have nothing to do with the paths - they only tell smarty - "do not try and interpret things inside here". This is because smarty thinks any thing inside { } is smarty code. But javascript uses {} too - so you are telling smarty - ignore my javascript code.

Yes - you do need to make sure your script understands the paths to your images. It can be relative or the entire path. If this is wrong - it can explain your problem. The paths should be relative to where the javascript is running - which is your home directory.

One tip when trying new scripts - first do it out side of xcart - just open an html file, debug it there. That eliminates any of the X-CART complications. You can get all your paths correct and get everything working. Once you have that - move it into X-CART. Then you know you are dealing with something to do with X-CART.
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold
(CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module)
Reply With Quote
  #14  
Old 02-26-2010, 01:07 PM
 
manishp manishp is offline
 

Advanced Member
  
Join Date: Jul 2009
Posts: 41
 

Default Re: Just cant get dynamicDrive scripts to work

Quote:
Originally Posted by gb2world
The literal tags have nothing to do with the paths - they only tell smarty - "do not try and interpret things inside here". This is because smarty thinks any thing inside { } is smarty code. But javascript uses {} too - so you are telling smarty - ignore my javascript code.

Yes - you do need to make sure your script understands the paths to your images. It can be relative or the entire path. If this is wrong - it can explain your problem. The paths should be relative to where the javascript is running - which is your home directory.

One tip when trying new scripts - first do it out side of xcart - just open an html file, debug it there. That eliminates any of the X-CART complications. You can get all your paths correct and get everything working. Once you have that - move it into X-CART. Then you know you are dealing with something to do with X-CART.

Thanks gb2World.

Your tip was great. It does make sense to have the script work on a simple HTML before merging it with x-cart.

I did exactly that and now I see the error - "jquery is not defined" in IE and firefox. since JQuery is coming from -"http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" which is available, I am not sure what could be wrong.

I updated this reference to use the jquery.min.js file within the skin1 directory and it did the trick for the HTML.

Now I need to get it to work within xcart. For some reason it just doesn't like relate paths for images. So the only way I could get it to work was by providing images as - http:\\www.myserver.com\img.jpg which is lame, but does the trick.

Again thanks so much gb2World and gizmo for helping me out. It was a great learning experience

Thanks again.
__________________
X-Cart: 4.2.1
Reply With Quote
  #15  
Old 02-26-2010, 01:37 PM
  gizmo's Avatar 
gizmo gizmo is offline
 

X-Adept
  
Join Date: Jan 2005
Location: Crawley : UK
Posts: 618
 

Default Re: Just cant get dynamicDrive scripts to work

Your Welcome
Glad you enjoyed the ride.....lol...
__________________
Thank You - Alan
Don't be like me, and keep saying "Nearly did it" go do it!!
Version: 4.4.4 Gold -
Reply With Quote
  #16  
Old 02-26-2010, 03:41 PM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Just cant get dynamicDrive scripts to work

I believe it's a path issue with the images.

Try using skin1/images/ad_banner_images/ad_banner53.jpg

You can still use relative paths, but remember the actual page is home.php, which is not in the skin1 folder.
__________________
xcart 5.1.2
Reply With Quote
  #17  
Old 02-28-2010, 05:18 AM
 
manishp manishp is offline
 

Advanced Member
  
Join Date: Jul 2009
Posts: 41
 

Default Re: Just cant get dynamicDrive scripts to work

Quote:
Originally Posted by Ashley
I believe it's a path issue with the images.

Try using skin1/images/ad_banner_images/ad_banner53.jpg

You can still use relative paths, but remember the actual page is home.php, which is not in the skin1 folder.

Thanks Ashley for your guidance, will give a try in a few

Just a thought, using if loops I was able to get the image slideshow appear in the right section for categories and product pages and not on the home page. Now, just curious if there is a way to display featured products from the current category rather than static images. Just the product thumbnail will do the trick for me. But since the script needs to reside within home.tpl, not sure if this is possible.

Any ideas if this may/may not work?

Thanks so much.
__________________
X-Cart: 4.2.1
Reply With Quote
  #18  
Old 02-28-2010, 01:16 PM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Just cant get dynamicDrive scripts to work

why does the script need ot be in home.tpl?
__________________
xcart 5.1.2
Reply With Quote
  #19  
Old 02-28-2010, 02:44 PM
 
manishp manishp is offline
 

Advanced Member
  
Join Date: Jul 2009
Posts: 41
 

Default Re: Just cant get dynamicDrive scripts to work

Well, DynamicDrive asks to put it between the <head> </head> tags and so I placed it there.

Here is the link to the script I am trying to add - http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm

you think its worth a try to place it say in the product.tpl rather or somewhere else?

Thanks so much.
__________________
X-Cart: 4.2.1
Reply With Quote
  #20  
Old 03-01-2010, 11:06 AM
  gb2world's Avatar 
gb2world gb2world is offline
 

X-Wizard
  
Join Date: May 2006
Location: Austin, TX
Posts: 1,970
 

Default Re: Just cant get dynamicDrive scripts to work

Quote:
Now, just curious if there is a way to display featured products from the current category rather than static images. Just the product thumbnail will do the trick for me. But since the script needs to reside within home.tpl, not sure if this is possible.

The script being in home.tpl should not prevent you from doing that. The smarty variables to build a javascript array out of featured products should be available to you.
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold
(CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module)
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:56 AM.

   

 
X-Cart forums © 2001-2020