Post by parkookk » Thu Sep 29, 2016 7:22 pm

Hi, I have opencart 2.3.0.2.
How come even through a code is uncommented in slideshow.tpl, it still working? catalog/view/theme/default/template/extension/module/slideshow.tpl

When I change the autoPlay it works.

Here is the code:

<script type="text/javascript"><!--
$('#slideshow<?php echo $module; ?>').owlCarousel({
items: 6,
autoPlay: 6000,
singleItem: true,
navigation: true,
navigationText: ['<i class="fa fa-chevron-left fa-5x"></i>', '<i class="fa fa-chevron-right fa-5x"></i>'],
pagination: true
});
--></script>

I am using English OpenCart 3.0.3.8, Default Template/Theme, php 7.4, Latest Brave Browser (No Ads-Blocker, etc.)


User avatar
Active Member

Posts

Joined
Thu Jan 17, 2013 11:56 pm
Location - london

Post by knowband.plugins » Thu Sep 29, 2016 10:41 pm

It's not necessary any more. This has only ever served as a backwards-compatibility hack - when scripts first started being inserted into static HTML pages, most browsers couldn't support them. Without the comments, they would ignore the <script> tag (which they didn't understand), and then would emit the script source onto the page.

So basically, unless you want to support really, really old browsers (at the cost of breaking some new ones) it's no longer necessary to do this.

Regards,
Knowband Team

Opencart Plugins: Knowband Store
Email: support@knowband.com


User avatar
Active Member

Posts

Joined
Thu Aug 04, 2016 2:56 pm

Post by parkookk » Fri Sep 30, 2016 8:25 pm

knowband.plugins wrote:It's not necessary anymore. This has only ever served as a backwards-compatibility hack - when scripts first started being inserted into static HTML pages, most browsers couldn't support them. Without the comments, they would ignore the <script> tag (which they didn't understand), and then would emit the script source onto the page.

So basically, unless you want to support really, really old browsers (at the cost of breaking some new ones) it's no longer necessary to do this.
Thank you for your reply.

So what's the best way to change the slideshow speed?

I am using English OpenCart 3.0.3.8, Default Template/Theme, php 7.4, Latest Brave Browser (No Ads-Blocker, etc.)


User avatar
Active Member

Posts

Joined
Thu Jan 17, 2013 11:56 pm
Location - london

Post by knowband.plugins » Fri Sep 30, 2016 8:53 pm

You can change 6000 (6 seconds) to your desired time and don't make any more changes in the file.

Regards,
Knowband Team

Opencart Plugins: Knowband Store
Email: support@knowband.com


User avatar
Active Member

Posts

Joined
Thu Aug 04, 2016 2:56 pm
Who is online

Users browsing this forum: Baidu [Spider] and 4 guests