Limited availability during the holidays
Another busy year is coming to its end, and an exciting year lies ahead. In order to get ready for a fresh new start, our team will spend a few days' rest during the winter holidays. Over the holiday break, we will have reduced staffing from December 20th, 2024, to January 5th, 2025, so please be patient if you do not receive a response as quickly as you normally would.
We send our warmest wishes for happiness, health, and success throughout the coming year. Thank you for your continued support, and may you have a peaceful and blessed Happy Holidays!
First off...let me preface this with the fact that I'm using the Layerslider-for-jQuery product with my Shopify store, so I cannot take advantage of the targeting and other built-in WP features. Also, unfortunately, I'm not a coder (although not completely clueless either...as they say - just enough knowledge to be dangerous). It's time to call in some professionals!
I have created a Layerslider welcome popup that I'd like to show only once per two days if the user clicks the "don't show again" input (where 2 is linked to their cookie's expiration).
For example, the old popup on my site used fancybox along with jquery.cookie.js to accomplish this. I feel like there might be a way to combine the jquery.cookie.js functionality with layerslider (maybe as a binding event?) This is the original code that I'm trying to tweak to do this:
The opening html, and the input at the end linked to the cookie:
don't show again }}
{{ 'jquery.cookie.js' | asset_url | script_tag }}
...........................
Don't show again
>>>>But now I'm stuck on how to combine the cookie.js with the js Initializing the slider.
(>>>Also - unrelated - but is there a hack to fix the skins path issue that arises if you can't have nested assets - as is the case with Shopify?)
I hope this made some sense. Can you help?
My code is disappearing from the original post....how to include code without it being processed as code? I attached it as a text file instead.
Hello Jamiesirensong,
Thank you for getting in touch with us. My name is Attila and I'm happy to assist you today.
I would like to confirm that we have received your message. Due to the nature of the issue you are experiencing, I will have to contact and consult with the development team first. I will get back to you as soon as I can.
We appreciate your patience while we're working towards your ticket.
Thank you for your patience.
We are sorry, but we cannot write your cookie handling code for you. Unfortunately we cannot help with custom js codes, so this will has to be done by yourself. But once you get the cookie handling to work, then you can easily make the popup slider init to load only when the cookie lets it. All you need is to call the init code inside an IF check.
Regarding the skin problem. You can use absolute and relative URLs too, both will work. But if you can provide us with further info on this case, or explain the problem in more details, we can help you further with it.
Attila,
Thanks for looking into it for me.
In case anybody else is trying to do this - after much trial and error, I gave up on the checkbox and instead set it so that the popup won't show until the cookie expires in 24 hours. Here is the code I'm using:
Regarding the skins issue - let me try to explain in more detail:
When the popup initiates, it automatically looks for the skin's css and associated files at a url that combines the name of the specified skin and skinsPath (e.g., it adds '/v6/' to the end of the skinsPath). Shopify does not allow the creation of folders (e.g., '/v6/'), and thus I get an error.
Would it work to just copy the css for the skins directly into the layerslider.popup.css file? And/or can you explain how I should format my url to clear the error?
Thanks!
Thank you for the feedback.
That might a problem for skins, but I believe we can work around this Shopify limitation.
Please extract the attached zip and copy the inside files to: cdn.shopify.com/s/files/1/1021/4279/t/46/assets/
Then rename skin to assets in the init code. And change the skinsPath to: //cdn.shopify.com/s/files/1/1021/4279/t/46/
It should be working this way.