Post by samdo2 » Fri May 17, 2019 6:04 pm

Hello, Friends!
For example, 5 banners are rotated in slideshow, I need to disable one of them for one or two days (but not delete).
Share the solution if there is. Opencart 2.3
Thanks a lot!

Newbie

Posts

Joined
Mon Apr 22, 2019 12:43 am

Post by thekrotek » Fri May 17, 2019 6:11 pm

Go to admin and disable it, then enable in 2 days.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by samdo2 » Fri May 17, 2019 6:28 pm

I need to disable (hide) one banner from five. I dont need to disable whole slideshow.
Maybe do a check by sorting number, and hide banners with number = 0
But what php-code add to controller for this function?

Newbie

Posts

Joined
Mon Apr 22, 2019 12:43 am

Post by thekrotek » Fri May 17, 2019 6:58 pm

Remove and re-add in 2 days. For PHP code, if you can't do it yourself, ask for commercial support.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by samdo2 » Sat May 18, 2019 12:38 am

Maybe someone will need.
File: catalog/controller/extension/module/slideshow.php
Find line

Code: Select all

if (is_file(DIR_IMAGE . $result['image'])) {
and replace it by this

Code: Select all

if (is_file(DIR_IMAGE . $result['image']) && $result['sort_order'] > 0 ) {
Now banners with Sort Order = 0 will disabled

Newbie

Posts

Joined
Mon Apr 22, 2019 12:43 am

Post by straightlight » Sat May 18, 2019 1:39 am

Code: Select all

if (is_file(DIR_IMAGE . $result['image']) && $result['sort_order'] > 0 ) {
will achieve the same goal if you want only 0 as disabled:

Code: Select all

if (is_file(DIR_IMAGE . $result['image']) && $result['sort_order']) {

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


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 39 guests