Dawn Slide Component

Solved
FervEngineering
Excursionist
19 0 11

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?

 

https://ux.shopify.com/next-generation-theme-design-5aae94f6d44c


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.

Replies 65 (65)
JohnFromJotting
Shopify Partner
665 94 129

For those who want a more intuitive slider, with actual slide functionality, I've created a blog on how to add flickity onto the dawn theme, found here https://www.bluish.io/shopify/how-to-create-a-product-image-slider-on-dawn-theme

You can test it out here - https://shopify.bluish.io/products/example

It's the bare minimum, so I can take any suggestions on what functionality you'd like, and I'll keep updating it.

flickity-slider-dawn.JPG

Check out my blog for some awesome Shopify, SEO and Social Media Marketing content.


To hire me, visit my Upwork profile

King-Kang
Trailblazer
141 7 52

Slider works really well!

Nice discovery! Some fresh air 🙂
Congratulations with your blog.
I will definetely follow.
Now it's time to learn a bit more with your tutorials!

Thank you

Menibig
Excursionist
15 0 5

I followed the instructions, and the slider itself works great.

But I have a problem with the slider-counter. Since I edited my Dawn theme code and changed it to Right-to-Left, I believe it's making it a little bit mixed up.

For some reason it's not showing me all numbers, but only the total-media, while the current image number is different everytime.

I added a short video to demonstrate.

Help would be appreciated.

made4Uo
Shopify Partner
1489 231 346

Hi, 

Please update your codes. Transform you Dawn Theme in Debut theme product page for free.

Enjoy this features below:

Product slider working.
Zoom feature working.
Variant buttons connected to the large image and the product slider.
Resize your thumbnail images.
No more massive images in the product page.

Check the code here for free. No app needed. Check the video for preview

Just be reminded that we are volunteering to help.
✿✿✿-

Likes  

and

 Accept as Solution

  will be much appreciated.✌-✿✿✿
For more Shopify Solutions and custom codes, just visit

 Made4Uo's website

.
Keep your stuffs private. Refrain from giving unnecessary access to your store.
akatev
Tourist
9 0 1

@made4Uo 

Hi, would you be able to help with creating a second product template for pre-order?  I had it with the old theme but unable to recreate one for the new Dawn theme.  It's pretty much another template to change the button from add to cart to Pre-order.

Also, is there a way to have a pop up alert when customer adding both pre-order and in tock items in the same cart?

 

Thanks.

made4Uo
Shopify Partner
1489 231 346

@akatev 

 

Can you tell me more about it?

Just be reminded that we are volunteering to help.
✿✿✿-

Likes  

and

 Accept as Solution

  will be much appreciated.✌-✿✿✿
For more Shopify Solutions and custom codes, just visit

 Made4Uo's website

.
Keep your stuffs private. Refrain from giving unnecessary access to your store.
akatev
Tourist
9 0 1

@made4Uo 

-I'm looking to have a separate product template for my pre-orders.  So instead of the Add to Cart button, we will have a Pre-order button instead.  

-The second part is for a possible pop-up alert for the shopping cart when a pre-order item is added to the cart that contain in stock item.  Typically, with mix items (in stock & Pre-order), we will have to wait until the pre-order to arrive and ship the whole order at once.  This pop up alert is to remind the buyer to not expecting the in stock items to ship right away when they are being carted and purchased along with pre-order items.  

 

Kumar2573
Shopify Partner
124 6 12

we added the slick slider in dawn theme with variants swatches.

Demo Url - https://devils-jitu.myshopify.com/products/test-product
password - test

Expert Shopify Plus & shopify Developer & Theme customizer
- If the problem is solved remember to click to Accept Solution
- Press Like ?? if the answer was helpful
- Still, Facing issue, Reach out to me Email :- jitendra3496@gmail.com | Skype :- jitendra2573_1
- Direct Hire me :- Direct Contact me
Menibig
Excursionist
15 0 5

@made4Uo  Thanks! I did it and it works just fine.

The only problem is when picking a variant it is not changing the large image. What did I do wrong and how should I fix it?

And one more thing, how can I use the same slider (without numbers/pagination) with collections on the home page?

made4Uo
Shopify Partner
1489 231 346

@Menibig 

You might have miss the step for the variant image. It is in global.js. I have a different slider for home page here

Just be reminded that we are volunteering to help.
✿✿✿-

Likes  

and

 Accept as Solution

  will be much appreciated.✌-✿✿✿
For more Shopify Solutions and custom codes, just visit

 Made4Uo's website

.
Keep your stuffs private. Refrain from giving unnecessary access to your store.
Menibig
Excursionist
15 0 5

@made4Uo  Thanks for the fast reply.

I just re-did the step with global.js again, but it's still won't work...

made4Uo
Shopify Partner
1489 231 346

@Menibig  it's hard to figure which one you did wrong without seeing your code. Can you message me in my website, Made4uo.com with your code?

Just be reminded that we are volunteering to help.
✿✿✿-

Likes  

and

 Accept as Solution

  will be much appreciated.✌-✿✿✿
For more Shopify Solutions and custom codes, just visit

 Made4Uo's website

.
Keep your stuffs private. Refrain from giving unnecessary access to your store.
smj_90
Shopify Partner
42 1 6

@Kumar2573 

Hi there, i checked your code, it's working only for 1st product only. For the rest of the products, it's not working. also the first product pictures keep on changing rest all are static.

i guess you forgot to call 'product unique id' when making that slider, though this approach is amazing!

If this helped you, please
mark this reply as 'Accepted Solution'
Thanks 🙂
smj_90
Shopify Partner
42 1 6

@made4Uo I noticed one thing while working with my theme, your code works fine with the product slider on product page, but you know what the built-in slider component which comes with the dawn theme by default is not working on mobile/tablet. 

change your code line in the slider.

onButtonClick(event) {
event.preventDefault();
const slideScrollPosition = event.currentTarget.name === 'next' ? this.slider.scrollLeft + this.sliderItems[0].clientWidth : this.slider.scrollLeft - this.sliderItems[0].clientWidth;
this.slider.scrollTo({
left: slideScrollPosition
});
}

to this

it will work then!

you can check on your own, I did it.

If this helped you, please
mark this reply as 'Accepted Solution'
Thanks 🙂
smj_90
Shopify Partner
42 1 6

@marcoswatanabe exactly what i was looking for! GREAT JOB!!

If this helped you, please
mark this reply as 'Accepted Solution'
Thanks 🙂
j1419
Explorer
49 2 17

@JohnFromJotting The product image slider works great on desktop but my images are not showing while on the mobile viewer. My store's preview link. 

https://u6upmackdx52944s-41111158934.shopifypreview.com

made4Uo
Shopify Partner
1489 231 346

@smj_90 

Just FYI. The code is made to specify the use of the productSlider (the one I added). This is the code that I wrote for the onButtonClick function. 

 

onButtonClick(event) {
event.preventDefault();

if (this.productSlider) {
const slideScrollPosition = event.currentTarget.name === 'next' ? this.slider.scrollLeft + (this.slider.clientWidth): this.slider.scrollLeft - (this.slider.clientWidth);
this.slider.scrollTo({
left: Math.floor(slideScrollPosition)
});

this.currSlide = Math.round(slideScrollPosition / this.slider.clientWidth);
if (this.currSlide === 0 ) {
this.prevButton.setAttribute('disabled', true);
} else {
this.prevButton.removeAttribute('disabled');
}
if (this.currSlide === this.totalPages / 3 ) {
this.nextButton.setAttribute('disabled', true);
} else {
this.nextButton.removeAttribute('disabled');
}
} else {
const slideScrollPosition = event.currentTarget.name === 'next' ? this.slider.scrollLeft + this.sliderLastItem.clientWidth : this.slider.scrollLeft - this.sliderLastItem.clientWidth;
this.slider.scrollTo({
left: Math.floor(slideScrollPosition)
});
}
}

Just be reminded that we are volunteering to help.
✿✿✿-

Likes  

and

 Accept as Solution

  will be much appreciated.✌-✿✿✿
For more Shopify Solutions and custom codes, just visit

 Made4Uo's website

.
Keep your stuffs private. Refrain from giving unnecessary access to your store.
JohnFromJotting
Shopify Partner
665 94 129

Hi @j1419 

 

I found the problem, seems like there is conflicting css elements being called.

 

In the main-product.liquid, in the product slider code.

 

Delete class="flickity-desktop" in the image tag <img class="flickity-desktop"

 

That will solve the issue. I also updated the blog to have a thumbnail slider. So you should use the new code

Check out my blog for some awesome Shopify, SEO and Social Media Marketing content.


To hire me, visit my Upwork profile

j1419
Explorer
49 2 17

@JohnFromJotting Thanks for that. The code is working great on mobile now. I like this original code without the thumbnails. Have you thought about making having both versions as separate blogs? Just a thought. Thanks again 

JohnFromJotting
Shopify Partner
665 94 129

Hi @j1419 

 

To get rid of thumbnail,

 

Find and delete below

{% if product.images.size > 1 %}
      <div class="carousel product__image-thumbnail">
        {%- for media in product.images -%}
        <div class="carousel-cell">
          <img
               data-flickity-lazyload-srcset="
                                              {{ media | img_url: '1440x' }} 1440w,
                                              {{ media | img_url: '1080x' }} 1080w,
                                              {{ media | img_url: '720x' }} 767w,
                                              {{ media | img_url: '480x' }} 480w"
               sizes="(min-width: 480px) 1440px, 1080px, 767px, 480x"
               data-flickity-lazyload-src="{{ media | img_url: 'master' }}"
               alt="{{ media.alt | escape }}"
               border="0"/>
        </div>
        {%- endfor -%}
        <!--- Coded by bluish.io --->
      </div>
      {% endif %}

 

then go to the script section and replace it to the below

<script>
  var elem = document.querySelector('.carousel.product__image-slider');
  var flkty = new Flickity( elem, {
    contain: true,
    imagesLoaded: true,
    lazyLoad: 1,
    wrapAround: true,
    {% if product.images.size < 2 %}
    prevNextButtons: false,
    {% endif %}
    adaptiveHeight: true
  });
</script>

 

That should bring back the dots and you should no longer have the thumbnail.

Check out my blog for some awesome Shopify, SEO and Social Media Marketing content.


To hire me, visit my Upwork profile