Zen Cart Logo
Forums / All Other Contributions/Addons / JS Easy slider- not so easy!

JS Easy slider- not so easy!

Views: 3,870

Results 1 to 11 of 11
14 Sep 2011, 10:42 PM
#1
burlington avatar

burlington

New Zenner

Join Date:
Sep 2011
Posts:
8
Plugin Contributions:
0

JS Easy slider- not so easy!

I am helping a Zen Cart user (version 1.3.9h) with some issues about his site as he seems to have been left high & dry by his developer.

I am new to Zencart but have had quite a lot of CMS experience generally. The one problem he has is with a jscript Easy Slider. He wants to make changes to the images; his developer has refused to help, which is where I come in.

I have used EasySlider in a CMS program but in that instance there was an editing facility to manipulate the images used, type of transition and so on.

For the life of me I can't find anything like this either on the Zen Admin Panel or on the server.

I am not an expert in JScript and would appreciate some advice. The script SRC path to the slider (using 'inspect element') is includes/templates/*****/jscript/jscript_easySlider.js

It would be strange if there was not a simple way of changing images but I can't find it!

Thanks for any help that you can give

Regards

Martin

14 Sep 2011, 11:28 PM
#2
nigelt74 avatar

nigelt74

Totally Zenned

Join Date:
Sep 2005
Location:
Waikato, New Zealand
Posts:
1,558
Plugin Contributions:
1

Re: JS Easy slider- not so easy!

  1. a link to the site, would help
  2. Where is the slideshow appearing on your site
    Is it the main page, if so the try going to

admin --> Tools --> Define pages editor --> select "define_main_page" from the dropdown and make sure editor is set to plain text

You should see the slides there, there isn't a fancy tool for zencart yet, its just editing the image links there

15 Sep 2011, 2:32 AM
#3
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: JS Easy slider- not so easy!

We've put in Easy Slider HERE

We followed (up to a point) the install method KERRIN HARDY advocates (Google for her site).

Where we disagree with Kerrin is her instruction to put the HTML <div> code into index_default.php .

No need to do this... You can put the HTML into the define_main_page.php using the tools >>> define pages editor, remembering of course to toggle out of WYSIWYG and into source mode, before you paste the DIV.

15 Sep 2011, 2:39 AM
#4
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: JS Easy slider- not so easy!

nigelt74:

admin --> Tools --> Define pages editor --> select "define_main_page" from the dropdown and make sure editor is set to plain text

You should see the slides there, there isn't a fancy tool for zencart yet, its just editing the image links there

Nigel is functionally 100% accurate here... but if the original developer used Kerrin's method, then you won't see the HTML block in define_main_page.php

It is probably in the tpl_index_default.php file.

My advice would be to cut it from that file, and use the define pages editor to put it into the main page... Follow Nigel's advice...

15 Sep 2011, 8:59 AM
#5
burlington avatar

burlington

New Zenner

Join Date:
Sep 2011
Posts:
8
Plugin Contributions:
0

Re: JS Easy slider- not so easy!

Thank you both for such speedy replies.

The site in question is: http://www.barnwoodcomputers.co.uk/ and the banners are the large display top middle. The one that needs deleting is the PC with a 'no longer available' notice which I put on the image

Nigel: you suggested 'admin --> Tools --> Define pages editor --> select "define_main_page". however, there is no text in these or indeed other files in this Tool.
On checking the files via CPanel, there is nothing there either.

I have found the banners both in /images and in a database table zen_banners but I cannot find where they are called from.

I have downloaded all the public_html files to my PC and have done extensive keyword searches under the banner file name, the product ID and so on. Can't find anything at all!

I am tempted to delete one of the banners from the table zen_banners to see what happens to the display. I have downloaded a copy of the table as backup so, subject to any further advice, I will try and see what happens.

Any more thoughts?

Thanks

Martin

15 Sep 2011, 9:08 AM
#6
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: JS Easy slider- not so easy!

Try this.

go to your webshop admin screen.

Under the TOOLS menu, go to Developer Toolkit.

When the toolkit loads, scroll to the very bottom input field and type in:

<div id="slider">

Then, choose to search in catalog, and conduct the search.

Let us know the results - ie: the names of the PHP file(s) in which this is shown.

15 Sep 2011, 9:51 AM
#7
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: JS Easy slider- not so easy!

By the way... don't confuse the zencart banner system with what's happening with this slider. Don't touch the database!

15 Sep 2011, 10:14 AM
#8
burlington avatar

burlington

New Zenner

Join Date:
Sep 2011
Posts:
8
Plugin Contributions:
0

Re: JS Easy slider- not so easy!

Schoolboy

I think we are getting somewhere!

PHP file is:

/home/barnwood/public_html/includes/templates/barnwood/common/tpl_main_page.php

AND

Line #127 : echo '<div id="slider"><ul>';

I have been in to this file and :-

<div id="featured_show"> <div id="left_wrapper"> <script type="text/javascript" src="includes/templates/barnwood/jscript/jscript_easySlider.js"></script>
<script type="text/javascript">
	$(document).ready(function(){	
	    
		$("#slider").easySlider({
			auto: true, 
			continuous: true,
			numeric: true
		});
		
	});	
</script>
 <?php 

global $db;
$sql = "SELECT banners_title,banners_url,banners_image FROM ".TABLE_BANNERS." z where status='1' and banners_group ='Wide-Banners'";
$result = $db->Execute($sql);
$path = HTTP_SERVER.DIR_WS_CATALOG.DIR_WS_IMAGES;
if ($result->RecordCount() > 0) {
echo '<div id="slider"><ul>';
while (!$result->EOF) {

			 echo '<li><a href="'.($result->fields['banners_url']).'"><img src="'.$path.($result->fields['banners_image']).'" class="clip" title="'.($result->fields['banners_title']).'" /></a></li>';
			
		$result->MoveNext();
	  }
	   echo '</ul></div>';
	} else {
	  echo 'no value';
	}

?>
</div>

I have looked at the zen_banners table again and assume I just change the 'status' of the affected banner from 1 to eg 0

Am I right?

Martin

15 Sep 2011, 1:55 PM
#9
burlington avatar

burlington

New Zenner

Join Date:
Sep 2011
Posts:
8
Plugin Contributions:
0

Re: JS Easy slider- not so easy!

IT WORKED!!

I changed the Status from 1 to 0 and, bingo, the image has gone.

Wow!!

Many thanks for your patience.

Still a bit of a mystery to me though why it is so user-unfriendly.

Martin

15 Sep 2011, 2:59 PM
#10
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: JS Easy slider- not so easy!

This is a rather sophisticated way of getting the core zencart banner system to "integrate" with Easy Slider.

In fact... it is rather neat, and I shall "clip" the code for later use!

So indeed your banner images are being controlled in the zencart banner manager, and this is where you will make changes to the images (banners).

15 Sep 2011, 3:24 PM
#11
burlington avatar

burlington

New Zenner

Join Date:
Sep 2011
Posts:
8
Plugin Contributions:
0

Re: JS Easy slider- not so easy!

Thank you again for your help.

In fact, to be honest, I never saw the Banner Manager. If I had then things would have been different!!

What really gets me is that the developer of that facility/code was unable to help his former client amend the banner list.

The net result is that the client had to use me to try to sort it out, which I did but only with your very considerable help, the original developer has lost cash, to my gain, and we are now all the wiser.

Regards

Martin