Post by STARS » Wed Mar 01, 2017 12:24 pm

I'm trying to make this vqmod compatible with the new version of Opencart 2.3.0.2:
Carousel: bestseller_lastest_special_featured

only this part of the vqmod is important for me which is related to the Latest module:

Code: Select all

	<file path="catalog/view/theme/*/template/module/latest.tpl">
		<operation>
			<notes>add owl-carousel to module</notes>
			<search index="" regex="false" trim="false"><![CDATA[<h3><?php echo $heading_title; ?></h3>]]></search>
			<add offset="0" trim="false" position="after"><![CDATA[<link href="catalog/view/javascript/jquery/owl-carousel/owl.carousel.css" type="text/css" rel="stylesheet" media="screen" />
<script src="catalog/view/javascript/jquery/owl-carousel/owl.carousel.min.js" type="text/javascript"></script>]]></add>
		</operation>
	
		<operation>
			<notes>Add id latest</notes>
			<search index="" regex="false" trim="false"><![CDATA[<div class="row">]]></search>
			<add offset="0" trim="false" position="after"><![CDATA[<div id="latest">]]></add>
		</operation>
	
		<operation>
			<notes>add custom responsive</notes>
			<search index="" regex="false" trim="false"><![CDATA[<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">]]></search>
			<add offset="0" trim="false" position="replace"><![CDATA[<?php if ($column_left && $column_right) { ?>
        <?php $class = 'col-lg-6 col-md-6 col-sm-12 col-xs-12'; ?>
        <?php } elseif ($column_left || $column_right) { ?>
        <?php $class = 'col-lg-4 col-md-4 col-sm-6 col-xs-12'; ?>
        <?php } else { ?>
	<?php $class = 'col-lg-3 col-md-3 col-sm-6 col-xs-12'; ?>
        <?php } ?>
        <div class="col-xs-12 owlCarousel">]]></add>
		</operation>
	
		<operation>
			<notes></notes>
			<search index="" regex="false" trim="false"><![CDATA[<div class="button-group">]]></search>
			<add offset="10" trim="false" position="after"><![CDATA[</div>
<script type="text/javascript"><!--
$('#latest').owlCarousel({
  items:2,
  autoPlay: false,
  navigation: true,
  navigationText: ['<i class="fa fa-chevron-left fa-5x"></i>', '<i class="fa fa-chevron-right fa-5x"></i>'],
  pagination: true,
  items : 4,
  // Responsive 
    responsive: true,
    responsiveRefreshRate : 200,
    responsiveBaseWidth: window,
  //Pagination
    pagination : false,
    itemsDesktop : [1199,4],
    itemsDesktopSmall : [980,4],
    itemsTablet: [768,2],
    itemsTabletSmall: false,
    //Lazy load
    lazyLoad : false,
    lazyFollow : true,
    lazyEffect : "fade",
    itemsMobile : [479,1]

});
--></script>]]></add>
		</operation>
	</file>

	<file path="catalog/controller/module/latest.php">
		<operation>
			<notes>add column left and right for show</notes>
			<search index="" regex="false" trim="false"><![CDATA[$data['button_compare'] = $this->language->get('button_compare');]]></search>
			<add offset="0" trim="false" position="after"><![CDATA[$data['column_left'] = $this->load->controller('common/column_left');
			$data['column_right'] = $this->load->controller('common/column_right');]]></add>
		</operation>
	</file>

and here are the changes I've made to make it compatible:

added "extension" to the following because the address has been changed in the new version:

Code: Select all

	<file path="catalog/view/theme/*/template/extension/module/latest.tpl">
added "product-layout" to the class because it has changed in the new version:

Code: Select all

			<search index="" regex="false" trim="false"><![CDATA[<div class="product-layout col-lg-3 col-md-3 col-sm-6 col-xs-12">]]></search>
I also added "extension" to the following because the address has been changed in the new version:

Code: Select all

		<file path="catalog/controller/extension/module/latest.php">
But it doesn't wok. what am I doing wrong ?

New member

Posts

Joined
Thu Jan 08, 2015 2:10 pm

Post by STARS » Fri Mar 03, 2017 9:46 am

It's been more than 3 years I've been waiting for build-in carousels for the Latest, Special and Featured modules but still nothing !!!

New member

Posts

Joined
Thu Jan 08, 2015 2:10 pm
Who is online

Users browsing this forum: No registered users and 2 guests