block certain text from appearing on Shopify product pages in the description - shopify

I import my ads from eBay to Shopify (https://asiasell.com.au). In the product descriptions in the Shopify site I want to display only the text that is NOT related to eBay. I think if I do the opposite, hide eBay related text, then google might think I'm trying to hide keywords. It's a couple of paragraphs I want to NOT show. I'm going to guess that I add code to the timber.scss.liquid file. Thanks!

Like the comments say you question is very edgy in the sense that this isn't exactly about programming. However I would like to see what you've tried. For now I can just answer your question with Sudo.
You need to first find the product.liquid (I don't know what theme you're using but this is just general) and you need to do something like
{% assign description_text = 'something that is in that text' %}
{% if product.description contains {{ description_text }} %}
hide // this actually adds the class hide to this product
{% endif %}
Then in css somewhere you can do:
.hide {
display: none;
}
If you ever need help with something like this then you can use the Shopify forum. To be franlky honest I don't see why those questions are accepted on Stack when Shopify have a whole forum for developers to discuss coding in liquid specifcally for Shopify.

Related

Shopware 6.4.12.0 Stock display in product page

i am new to this website so maybe this question is already asked before.
i am currenlty setting up products using shopware 6, but when it comes to stock its not showing the qty but only a text (in stock), did someone else ahd this problem and does someone have an idea for me to add this.
again i am new to this, so if any info is needed please let me know.
Thanks
You probably need to adjust the template of the html page to display that information, take a look at the docs on how to do that.
But this can differ if you use a different theme then the default one. Depending on the theme you use there may be already a configuration for that.
Sorry totally forgot about this, as i found the solution for my isseu.
but for the new users, when editing the script i use box standaard html twig
you can add a new block
in my case
{% block component_product_box_STQTY %}
Stock: {{product.stock}}, Central warehouse 1-3 Days</>
{% endblock %}
the {{product.stock}} shows the actual value you have in stock
hope someone can us it

How to add a credit card logo in the product page of a Shopify site

Reviewing our Shopify site, I realized that a major difficulty with Shopify is that it's as if the theme does everything possible to obfuscate credit card usage. The site is replete with all sorts of references to Google Pay, Amazon Pay, etc., but credit card payments are always difficult to find.
I would like to know how to add a credit card logo right below the BUY IT NOW button. Could you please let me know if it is possible to do it in Shopify by editing LIQUID file? If so, please point me
Yes, Its possible to do in shopify by editing Liquid file.
You can find code of "Buy It Now" button in your template.
{% if enable_dynamic_buttons %}
{{ form | payment_button }}
{% endif %}
Either code is in sections/product-template.liquid or in snippets/product-form.liquid
You can add code of logo after above code. You can upload logo image either in theme or under files in shopify and then can use HTML code to put logo image.
For e.g.
<img src="{{'creditcardlogo.png' | file_img_url: 'original' }}">

Disable certain Shopify apps on certain pages

There are about 20 apps installed on our shop. Different apps are used on different pages. For example, there are apps which are used on the product page only.
However I see that all apps are loaded on every page. Looking into page source I see JavaScript function asyncLoad which is part of built-in {{ content_for_header }} variable. This function load scripts for all apps on every page. So, can I restrict this somehow? I mean - to avoid of downloading scripts/css/whatever of apps which I don't use on the specific page. For example, on the home page I need just a couple of apps active, not all 20 of them. Didn't find the answer in docs or Google.
It sounds like you've already figured out a lot about how Shopify allows apps to load their scripts, so you're most of the way there!
When I've needed to selectively disable apps, I have removed them from the asyncLoad function using something like the following:
{% capture modified_content_for_header %}{{ content_for_header }}{% endcapture %}
{% if template.name == 'index' %}
{% assign modified_content_for_header = modified_content_for_header | remove: 'some_app_url.js,' %}
{% endif %}
<!-- If you have a lot of templates you are checking, a case/when using template.name might be appropriate -->
{{ modified_content_for_header }}
I like using {% if template.name == value %} rather than {% if template contains value %} for template checks, as that ensures I don't accidentally get a false positive for a template suffix that contains one of the other template types for some reason, like a collection.alternate_product_layout or something silly like that.
Disclaimer: Messing with 3rd party apps by removing their script files may have unexpected side-effects, so always be sure to exercise caution and test thoroughly on an unpublished theme!

Show product variants in Search results and auto suggestion instead of individual products

I have a shopify shop using the turbo theme. I would like to show product variants as individual items in the search results page and the auto-suggestion box instead of showing products.
Any ideas on how to achieve this ?
If you re not a dev, I suggest you should buy an app which provide the function you want or hire a shopify expert so he can help you tweek your theme.
If you re a dev, for show product variants as individual items. You just need
{%for product in product.variant%}
Your liquid code
{% endfor %}
for the 2nd , find search.liquid in snippet and add some javascript there.

How to edit content on pages for Collection Tags in Shopify

When creating Collections in Shopify I can easily add Tags to them, which are then displayed on the Collections pages (in most of the themes I've used so far). The Collections page will typically show all the Tags for any Product within that Collection.
If you click the Tag it will go to a new page. I'm trying to find a way to edit those pages - it does not appear that this ability is built into Shopify, so I'm looking for the best solution.
There are easily over a hundred tags on this site too. My hope is to avoid writing a ton of conditional statements, but I fear that may be my only option.
Liquid - Example of what I'm thinking:
{% if current_tags == 'tag-name' %}
unique content for that tag
{% endif %}
Can anyone point me in a better direction?
The solution was simpler than I thought. I was using == when I should have been using 'contains'. Not that if your tags use spaces then you should type them exactly the same vs adding dashes to fill spaces.
Example:
{% if current_tags contains 'My Tag' %}
<!-- Custom HTML goes here -->
{% endif %}