Close

change the direction of the JCarousel

shayt
11 years ago
#2180 Quote
Avatar
  • 46
Hi,

how can i change the direction of the scrolling of the JCarousel ?
when i click on the next button of the JCarousel, it goes to the other direction.
i think it because i am using RTL theme.

Thanks,
Shay
Boyko
11 years ago
#2181 Quote
Avatar
  • 1570
shayt wrote:
Hi,

how can i change the direction of the scrolling of the JCarousel ?
when i click on the next button of the JCarousel, it goes to the other direction.
i think it because i am using RTL theme.

Thanks,
Shay


Hi shayt,

Yes, when the language is RTL then this is the expected behavior.
If your current language supports RTL then the JCarousel is automatically RTL enabled and that is why the direction is RTL. If you switch to a language that is not RTL then the JCarousel will have the default direction.

Thanks
Regards,
Nop-Templates.com Team
shayt
11 years ago
#2183 Quote
Avatar
  • 46
but it doesn't make sense.
when i click on the one of the arrows, i want it to scroll to the same direction even if i am using RTL theme.

can you please let me know how can i change that in the RTL theme ?
(maybe do it in a parameter so the user can choose)

Thanks,
Shay
Boyko
11 years ago
#2184 Quote
Avatar
  • 1570
shayt wrote:
but it doesn't make sense.
when i click on the one of the arrows, i want it to scroll to the same direction even if i am using RTL theme.

can you please let me know how can i change that in the RTL theme ?
(maybe do it in a parameter so the user can choose)

Thanks,
Shay


Hi Shay,

I think there is some misunderstanding. Could you send us a link to your web site, so that we can take a look?

Thanks
Regards,
Nop-Templates.com Team
shayt
11 years ago
#2185 Quote
Avatar
  • 46
this is my site-
http://goo.gl/qpwvV
Boyko
11 years ago
#2186 Quote
Avatar
  • 1570
shayt wrote:
this is my site-
http://goo.gl/qpwvV


Hi shayt,

I don't see anything wrong with it. When I click the right arrow the carousel moves on the right and the same for the left arrow. Am I missing something?

Thanks
Regards,
Nop-Templates.com Team
shayt
11 years ago
#2188 Quote
Avatar
  • 46
if you look at http://demos.nop-templates.com/
when you press on the right arrow, the items goes to the left
i want it to be also on my site (which is RTL theme), currently it goes to the right.

IvanStoyanov
11 years ago
#2191 Quote
Avatar
  • 269
shayt wrote:
if you look at http://demos.nop-templates.com/
when you press on the right arrow, the items goes to the left
i want it to be also on my site (which is RTL theme), currently it goes to the right.



Hi shayt,

To do this you need to go to /Plugins/SevenSpikes.Nop.Plugins.JCarousel/Views/JCarousel/JCarousel.cshtml In the view find the following code:

bool supportRtl = EngineContext.Current.Resolve<IWorkContext>().WorkingLanguage.Rtl;
    if (supportRtl)
    {
        Html.AppendCssFileParts("~/Plugins/SevenSpikes.Nop.Plugins.JCarousel/Themes/" + Model.Theme + "/Skins/skin.rtl.css");
    }


add the following line right after the code (line 24-25):

supportRtl = false;


Ivan Stoyanov
Thank you for choosing our products! Your feedback is important to us!
shayt
11 years ago
#2195 Quote
Avatar
  • 46
hi,
the direction solved,
but now there are two problems -
1. there is an empty space (because the float is left instead of right)
2. when you press on the right arrow, i don't see cycle of the products like i declared

Thanks,
Shay
IvanStoyanov
11 years ago
#2196 Quote
Avatar
  • 269
shayt wrote:
hi,
the direction solved,
but now there are two problems -
1. there is an empty space (because the float is left instead of right)
2. when you press on the right arrow, i don't see cycle of the products like i declared

Thanks,
Shay


Hi,

Replace the following code:

bool supportRtl = EngineContext.Current.Resolve<IWorkContext>().WorkingLanguage.Rtl;
    if (supportRtl)
    {
        Html.AppendCssFileParts("~/Plugins/SevenSpikes.Nop.Plugins.JCarousel/Themes/" + Model.Theme + "/Skins/skin.rtl.css");
    }
supportRtl = false;


with:

bool supportRtl = false;


Ivan Stoyanov
Thank you for choosing our products! Your feedback is important to us!