Post by wasikovee » Tue Sep 18, 2018 9:33 pm

Hello,
I am looking for some code related help about Carousel. Currently i have 6 related products under product page. but i need to show them as a sliding carousel in one row, with next and previous button (or arrow mark). Auto sliding is not necessary.
My related product code is below:

Code: Select all

<br>
	{% if products %}
      <h3>{{ text_related }}</h3>
      <div class="row"> {% set i = 0 %}
        {% for product in products %}
        {% if column_left and column_right %}
        {% set class = 'col-xs-8 col-sm-6' %}
        {% elseif column_left or column_right %}
        {% set class = 'col-xs-6 col-md-4' %}
        {% else %}
        {% set class = 'col-xs-6 col-sm-3' %}
        {% endif %}
        <div class="{{ class }}">
          <div class="product-thumb transition">
            <div class="image"><a href="{{ product.href }}"><img src="{{ product.thumb }}" alt="{{ product.name }}" title="{{ product.name }}" class="img-responsive" /></a></div>
            <div class="caption">
              <h4><a href="{{ product.href }}">{{ product.name }}</a></h4>
              
              {% if product.rating %}
              <div class="rating"> {% for j in 1..5 %}
                {% if product.rating < j %} <span class="fa fa-stack"><i class="fa fa-star-o fa-stack-1x"></i></span> {% else %} <span class="fa fa-stack"><i class="fa fa-star fa-stack-1x"></i><i class="fa fa-star-o fa-stack-1x"></i></span> {% endif %}
                {% endfor %} </div>
              {% endif %}
              {% if product.price %}
              <p class="price"> {% if not product.special %}
                {{ product.price }}
                {% else %} <span class="price-new">{{ product.special }}</span> <span class="price-old">{{ product.price }}</span> {% endif %}
                {% if product.tax %} <span class="price-tax">{{ text_tax }} {{ product.tax }}</span> {% endif %} </p>
              {% endif %} </div>
            
          </div>
        </div>
        {% if column_left and column_right and (i + 1) % 2 == 0 %}
        <div class="clearfix visible-md visible-sm"></div>
        {% elseif column_left or column_right and (i + 1) % 3 == 0 %}
        <div class="clearfix visible-md"></div>
        {% elseif (i + 1) % 4 == 0 %}
        <div class="clearfix visible-md"></div>
        {% endif %}
        {% set i = i + 1 %}
        {% endfor %} </div>
        {% endif %}
        {% if tags %}
        <p>{{ text_tags }}
        {% for i in 0..tags|length %}
        {% if i < (tags|length - 1) %} <a href="{{ tags[i].href }}">{{ tags[i].tag }}</a>,
        {% else %} <a href="{{ tags[i].href }}">{{ tags[i].tag }}</a> {% endif %}
        {% endfor %} </p>
        {% endif %}
	<br>
Thanks.

Wasik Ovee
CEO
DesignPhenomena


User avatar
Newbie

Posts

Joined
Thu May 10, 2018 6:07 pm

Post by straightlight » Wed Sep 19, 2018 5:50 am

The easiest solution would be to duplicate the carousel extension module into your related products as all you'd need to change would be the catalog model's method name to show all related products on the same row.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by wasikovee » Wed Sep 19, 2018 8:32 pm

straightlight wrote:
Wed Sep 19, 2018 5:50 am
The easiest solution would be to duplicate the carousel extension module into your related products as all you'd need to change would be the catalog model's method name to show all related products on the same row.
Good advice. I will try that. Thanks.

Edit: Some more details would be nice.

Wasik Ovee
CEO
DesignPhenomena


User avatar
Newbie

Posts

Joined
Thu May 10, 2018 6:07 pm

Post by raconul » Tue Oct 27, 2020 11:54 pm

I am looking for the same thing for OpenCart 3.0.2.0
Related products on the product page to show as a carousel slider.
I found an extension, but does not work. Does someone know how can I achieve this?
Thanks.

User avatar
New member

Posts

Joined
Thu May 18, 2017 1:54 am

Post by straightlight » Wed Oct 28, 2020 1:58 am

raconul wrote:
Tue Oct 27, 2020 11:54 pm
I am looking for the same thing for OpenCart 3.0.2.0
Related products on the product page to show as a carousel slider.
I found an extension, but does not work. Does someone know how can I achieve this?
Thanks.
Contact the extension developer to resolved this issue.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by raconul » Sun Nov 01, 2020 9:46 pm

straightlight wrote:
Wed Oct 28, 2020 1:58 am
Contact the extension developer to resolved this issue.
Left a comment that it's not working, like everyone else there:
https://www.opencart.com/index.php?rout ... =samhawari
Uninstalled it, but cannot find a good one for 3.0.2.0

User avatar
New member

Posts

Joined
Thu May 18, 2017 1:54 am

Post by straightlight » Sun Nov 01, 2020 10:04 pm

raconul wrote:
Sun Nov 01, 2020 9:46 pm
straightlight wrote:
Wed Oct 28, 2020 1:58 am
Contact the extension developer to resolved this issue.
Left a comment that it's not working, like everyone else there:
https://www.opencart.com/index.php?rout ... =samhawari
Uninstalled it, but cannot find a good one for 3.0.2.0
You could always create a new service request in the Commercial Support section of the forum or contact an Opencart partner by using the Resources link at the top of the site or contact me directly via PM to get this done as a custom job.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 156 guests