Ask A Guru: Customizing Your Theme

Tourist
6 0 0

Sher1 - did you get an answer to that one?

0 Likes
New Member
1 0 0

Hello.

 

I'm using a theme called Impulse. 

 

What I want to do is to add an "add to cart" button to the product grid. The code below is found in a file called product-form.liquid under snippets.So I added the code to the product-item-grid.liquid under snippets. While the button does show up, it says sold out regardless whether the product is in stock or not. I'm thinking it has to do something with the if templates? 

 

    <button
      {% if product.empty? %}type="button"{% else %}type="submit"{% endif %}
      name="add"
      id="AddToCart-{{ section_id }}"
      class="btn btn--full add-to-cart{% if enable_dynamic_buttons %} btn--secondary{% endif %}"
      {% unless current_variant.available %} disabled="disabled"{% endunless %}>
      <span id="AddToCartText-{{ section_id }}">
        {% if current_variant.available %}
          {% if template == 'product.preorder' %}
            {{ 'products.product.preorder' | t }}
          {% else %}
            {{ 'products.product.add_to_cart' | t }}
          {% endif %}
        {% else %}
          {{ 'products.product.sold_out' | t }}
        {% endif %}
      </span>
    </button>

 

 

0 Likes
New Member
1 0 0

I sell products.  Mainly (1) product and a half dozen accessories.  However I sell this same product to several different market segments (musicians, partially sighted, rock collectors).  What type of design theme and structure would you recommend?  

0 Likes
New Member
2 0 0

Hi There

I have an issue with webloading fonts that is slowing the mobile version of my site down.  It is webloading a font from gstatic, but i cant find it anywhere in my code.  it is also present in the the default pop theme without customisation so I don't think it is from a third party app.  Help with where I can locate the font would be great

 

thanks

 

 

 

 

 

0 Likes
New Member
2 0 0

Hi there

 

I am having trouble locating a webfont that is loading in my store that I can't find in any of the style sheets.  It is from gstatic - opensans - below is a download from google lightsource - its the last one on the list

 

"Ensure text remains visible during webfont load
 
Leverage the font-display CSS feature to ensure text is user-visible while webfonts are loading. Learn more.
 

URLPotential Savings

/lato/lato_n4.c86cddc….woff2?h1=…
(fonts.shopifycdn.com)
420 ms
/raleway/raleway_n5.8806e3e….woff2?h1=…
(fonts.shopifycdn.com)
370 ms
/raleway/raleway_n7.a3667ec….woff2?h1=…
(fonts.shopifycdn.com)
400 ms
…assets/icons.woff?2996
(cdn.shopify.com)
400 ms
…v13/RjgO7rYTm….woff2
(fonts.gstatic.com)
360 ms

 

 

ANY HELP PLEASE??

0 Likes
New Member
2 0 0

Looking to customize on Impulse theme. I cant seem to find the right variables, looking to hide the price on just one of my products but not the rest. I asked the impulse support to help but they said they don't help with customization. Would greatly appreciate any support!

0 Likes
Shopify Partner
2 0 1
Create a product alternative template + section and hide the price in
product alternative and then go to product change product template to
product alternative
0 Likes
New Member
2 0 0
Hey Rabia, that's what I'm trying to do but I can't seem to find the
correct code to hide the price within the Impulse theme.
0 Likes
Tourist
6 0 0
You can delete the price in product page in the admin side.

Custom code needed to have the variable to hide and unhide option. Use
shopify partners (market place) to help with. They will quote the work
first.



0 Likes
Shopify Partner
1558 269 328

Hi @jamescong 

You no need to create alternate template or hide price form admin you can do just by product tag, follow this:

1. Add tag in product in which you want to hide price like "hide_price".

2. Open Section->product-template.liquid->find your price code "product.price" or may be snippet product-price.liquid and add condition like bellow:

 

{% for tag in product.tags %}
  {% unless tag contains 'hide_price' %}
     //Your price goes here...
 {% endunless %}
{% endfor %}

 

 

Want to modify or custom changes on store hire me.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com
Skype: jasoliya.brijesh
0 Likes