Customizing Product Sale Badges on Your Shopify Dawn Theme

Поделиться
HTML-код
  • Опубликовано: 1 фев 2025

Комментарии •

  • @theprompted
    @theprompted  Год назад +3

    For anyone looking for the code used in this video, you can find it here: theprompted.co/blogs/tutorials/customizing-product-sale-badges-free-tutorial. Happy customizing!

    • @saschab.5154
      @saschab.5154 Год назад

      How to keep code changes after an update of the theme?

    • @theprompted
      @theprompted  Год назад

      If you're installing a fresh theme (whether a different theme or a new version of your existing one), then unfortunately you'll have to make the code changes to the new theme all over again. Your non-code theme settings and customizations would need to be re-implemented, and it's the same with any code customization.

  • @bielconn
    @bielconn День назад

    Thank you so much :D

  • @ItsAlejandropere
    @ItsAlejandropere 10 месяцев назад +2

    Man you became my go-to for Shopify customization, I watched many tutorials and you and Bitbranding are the only 2 that never fail, thanks

    • @theprompted
      @theprompted  10 месяцев назад

      Thank you for sharing that! Really appreciate your support, and I'm happy that it's been helpful :)

  • @MitevValentin
    @MitevValentin 8 месяцев назад

    Thanks a lot! I have been searching for that for so long.

  • @mwalyeEcoMentor
    @mwalyeEcoMentor 10 месяцев назад

    thank you brother for these videos. Very very informative. Kindly make one where the product price can be a bit BOLD from the compare price so that its easily visible to potential customers.

    • @theprompted
      @theprompted  10 месяцев назад

      Glad you like them!
      To make the price bold, try adding the following css code into the "Custom CSS" box for your Product Information Section in the theme editor:
      .price .price-item--sale {
      font-weight: bold;
      }

  • @SjoerdvanOostrum
    @SjoerdvanOostrum Месяц назад

    how can i change the badge for the products in one specific collection? i placed the product in a different template already

  • @GardenHands
    @GardenHands 3 месяца назад

    Just getting my shop set up and wondering if you can upload an image to your 'sale' items? So instead of the red 38% Off bar, some of my varieties would have a custom image that says Buy One Give One.

  • @siddiqui-pd4ln
    @siddiqui-pd4ln Год назад

    Great information

  • @ShyamsTech
    @ShyamsTech 14 дней назад

    there is a problem:
    I have this codes live on my website from your video title: Add These Badges To Scale Your Shopify Store
    and this are working fine but I want to replace Sale with % OFF as discuss in this video but it's not working, Can you provide customized Code that can work with your previous video codes??

  • @MK-Tech
    @MK-Tech 11 месяцев назад

    Do you know how to move the sale badge to be on top of the product image on product pages? It’s really useless to have it next to the price…

  • @MK-Tech
    @MK-Tech Год назад

    Great tutorial!
    How can I add so the "off" show up in the language files for translations?? I have edited it so it says "Save x% now". How do I make "Save" and "Now" to show up in the transitions?? And so the Translate and Adapt app can translate it?
    Also, do you have a video showing how to display inventory qty for the selected variant? And to maybe add a green checkmark if it's in stock, and a red x if the inventory for the variant (or product) is 0 or less.

    • @theprompted
      @theprompted  Год назад

      Great questions!
      For translations, I will have to look into it since the audience we build for is typically in English. I've added it to my list of future video topics.
      I don't currently have a video for displaying the inventory amount, but I'll also add that to the list of ideas :)

    • @MK-Tech
      @MK-Tech 11 месяцев назад

      @@theprompted Thanks. I managed for figure it out :) Both the translation and the inventory.

    • @theprompted
      @theprompted  11 месяцев назад

      That's great! Do you mind sharing what you found with everyone else in case they ran into the same problem?

    • @theprompted
      @theprompted  11 месяцев назад

      I know you figured out the inventory question that you had, but just wanted to let you know that you inspired a video on this topic, and I've also added a few extra customizations that you might like! You can see it here: ruclips.net/video/-CJwU-ktAFY/видео.html

    • @MK-Tech
      @MK-Tech 11 месяцев назад

      @@theprompted I watched it! And I love it. I will consider to replace my current solution with yours 🥳👍

  • @DeadlyRosa
    @DeadlyRosa Год назад

    Is there a way for the badge to show up next to the price on the collections page instead of it showing over the images?

    • @theprompted
      @theprompted  Год назад +1

      Great question! There is a way. You can go to card-product.liquid and search for the line: {% render 'price', product: card_product, price_class: '', show_compare_at_price: true %}. Add the parameter show_badges: true, so that it becomes: {% render 'price', product: card_product, price_class: '', show_compare_at_price: true, show_badges: true %}

  • @andreizhao3414
    @andreizhao3414 Год назад

    Hi! Can you make a tutorial on how to display different images per variant?

    • @theprompted
      @theprompted  Год назад

      Do you mean connecting a different image per variant so that when the customer selects the variant with the variant picker they see the corresponding image? If so, Shopify has some documentation on that: help.shopify.com/en/manual/products/product-media/add-images-variants
      Is this what you're looking for?

  • @drodriguessantos
    @drodriguessantos Год назад

    Hey men! For me, it's not working. When I write the {%- assign float_difference = difference | times: 1.0 -%} it says that float_difference is assigned but not used.
    I'm using the Dawn 12.0
    Do you know how I can solve this?
    Thanks!

    • @theprompted
      @theprompted  Год назад

      It sounds like you've created the variable, but aren't using it later in your code. Try following the instructions here: wescalebrands.notion.site/The-Prompted-Customizing-Product-Sale-Badges-6141470a9a1844649b30169086398b5d?pvs=4 to see if it helps.

  • @ecemdemirel5414
    @ecemdemirel5414 4 месяца назад

    It doesnt work. What can be the problem?

    • @theprompted
      @theprompted  4 месяца назад

      This should still work on the latest free Shopify themes. Here are some things to check for troubleshooting:
      1. Was the code added properly? You may want to install a fresh new version of your theme and try again from the beginning to see if you get a different result.
      2. Are you using a compatible theme? This code is for the free Shopify themes like Dawn, Sense, Refresh, etc.
      But if you're still not able to get this working, then we offer more in depth technical support in our community (along with many other perks). Check it out if you're interested: www.skool.com/the-prompted/about

  • @kediasuraj
    @kediasuraj 7 месяцев назад

    This was quite helpful. I have one query though. For the first (collections) part, can the code be put continuously like below? Will this lead to any issue?
    {% comment %} {{- 'products.product.on_sale' | t -}} {% endcomment %}
    {%- assign difference = card_product.compare_at_price | minus: card_product.price -%}
    {%- assign float_difference = difference | times: 1.0 -%}
    {%- assign discount_fraction = float_difference | divided_by: card_product.compare_at_price -%}
    {%- assign discount_percentage = discount_fraction | times: 100 | round -%}
    {{ discount_percentage }}% OFF

    • @theprompted
      @theprompted  7 месяцев назад

      Yes, you can do that! Just double check that it shows up properly on your site.