When reading the link below, it says Dawn will have a slider. Either I can’t find it, or it hasn’t been shipped in the last version. Does anyone have insight into this?
Edit: I just found a slider example in a section named “featured-blog” which doesn’t seem enabled. I don’t know if it hasn’t been completed yet or if we’re supposed to figure out how to implement it on our own.
@marcoswata Thanks, I found its usage in featured-collection.liquid and is used as below-looks like they created a custom HTML element for it. I’ll accept your answer as the solution.
Thanks for the quick solution. Can you also explain how can we enable this product slide on the desktop version also.
I am struggling to be slider to be displayed on desktop also on the DAWN theme
It’s going to be a little bit involved to get it to work. You’ll need to get the products to keep the horizontal grid and unhide the slider buttons like mobile uses. All the classes are already available, but you might want to make an alternate version so it’s not confusing when someone’s trying to debug and they see class=“mobile-xxx” when the viewport is at desktop size.
I tried everything, by playing with classes and liquid, ALAS! no workaround found!
There is a solution but no accepted! Unless, I don’t copy the slider component, and duplicate it and one I call for desktop and other for mobile/tablet version, it doesn’t work for desktop!
But duplicating the code is nothing but redundancy.
I have achieved adding a slider to the product page images by using the slick slider.
Notes:
This requires adding code and not editing any of the existing.
The click to enlarge still works from the existing code.
Works on mobile
There is 4 files to edit:
main-product.liquid
section-main-product.css
header.liquid
footer.liquid
Step 1: For main-product.liquid add the following and comment / remove the “” start and end tags. Add the below code before the tag we removed or commented out.
@smj_90 for sure it’s adding more but not too much. I didn’t notice any impact on performance. I started to look into how to implement the built-in slider component but it would take alot of time I don’t have to figure out what CSS @media quires need to be modified or disabled for force showing it on desktop. Not to mention any other code that may be altering how it looks.
For now I think this will have to do as the best free option as I did not come across any other step by step solutions. I came across the barstool dev one but for the life of me couldn’t get it to work.
@shadowsfall118 Your solution has been the only one that I have seen that works to implement a slider on Dawn’s product page. Very detailed instructions worked great. Thanks
Fortunately, I manage to customize the Dawn code and added a product slider. I preserve the slider-component code and mostly customize the CSS. Oh I added a javascript code also so when you click the image, the large image container should show the clicked image. Not only that, my product images has different heights, so I added a code so that the slider adjust to the height of the large image. Do not worry. I don’t work with any app or any website. The code is free. Just give me a thumbs up if I solve your problem.
@made4Uo I followed your guide with a base dawn theme as I like how you implemented the thumbnails but i’m not getting the large main image (only thumbnails). Any thoughts?
I also have the same problem, i have even tried deleting and copying the entire css text that is on the website, as this is probably a direct copy from your dev site - i thought it was me. The css file in the video and the one on the site are different, but only because with the cut and paste one you include all the code that has been commented out i think.
I have gone step by step by with the video and also by just following the steps on the page, it is a fresh “Dawn” install so no other customisations have taken place as yet.
I think there is a problem with the css style sheet or the script as it doesnt appear to be calling or linking up with the large image in any way, certainly the large image isnt displayed and the slider does not move.
When you do the first step you are left with giant product images on the product page, which is fine, then you implement the css file and the images shrink to what you would expect the ones along the bottom of the carousel (but with no large image showing). This at least does seem have a slide component that works, but when you change the global.js file to “3” and “4” the slider stops moving and you are left with 4 (or however many images you have on your product page) thumbnail images that just run along the bottom…
I have included a screenshot to show you what i mean, if you could take a look at your code or even try it on a fresh dawn install that would be great as others have shown how to do a slider on the main product images, which is great, but i need a carousel for a design i am working on.
Thank you for letting me know. The large image is the original image from Dawn, which has the modal, the zoom bottom. I edited the new Dawn theme, which is unedited.
The bold code is responsible for the big image. The red code is from Dawn. Take note too. In the video, I did not comment out the whole CSS file. Can you post your code?