Shopware 6.4.12.0 Stock display in product page - stock

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

Related

Is there any way to instantiate multiple static sections within a page for Shopify?

I'm fairly new to liquid and Shopify development, but I'm making my way through. I've hit a snag where it seems like what I want to accomplish isn't possible. I'm making a static article page that's primarily HTML, but scattered throughout, I'd like to include instances of a relevant "You Might Like" section to display products.
<HTML>
{% section 'youMightLike' %}
<HTML>
{% section 'youMightLike' %}
I've tried adding a "presets" in the schema tag, and while that allows my section code to be placed anywhere on the homepage and function the way I think it should, my static page only allows for one collection to be chosen (which is then applied to every section on the page).
I've also tried adding blocks to the schema so I could just choose the collection in the block, but that seems to consolidate all the {% section 'youMightLike' %} lines across my entire page.
Am I thinking about this the right way, or is there something else I should be looking into?
Provided your theme is Online Store 2.0 capable, all you need is a unique page template and then you can just add whatever sections are necessary via the customizer.
If it's just a general page or what have you, break your HTML into a section or sections you can include on the page and then you can move around as needed https://shopify.dev/themes/architecture/sections
If your theme isn't 2.0 capable, then you can just create additional sections by modifying them slightly so they're unique. Just copy the section and then modify the name somehow so it's not the same.

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.

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

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.

Add custom fields on adding product in shopify

How to add some extra details while adding products?
Currently I am able to add Variant in Product which shows an input field for the product in product details page. But then, I require to add the same Variants for all products.
My Requirement was to add custom field, e.g. Weight, Height, Wood Type, Color etc. that would appear for all products that are of category Table.
Is this possible some how?
This can be accomplished by creating a new template for your product. You can find some documentation for manually configuration additional product options here.
Most merchants on Shopify use apps to avoid manually configuring additional product options.
A simple task for you would be to add the information using the API for metafields since you are saying they are to be added to all the products. More information on metafields API and liquid are in the links below
Metafield Object and Metafield API
If they are only a few products, you can give this app a spin - ShopifyFD
If the different fields affect the price, create variants. Metafields can also be defined at variant level.
Product metafields can be managed from the Shopify adminpanel directly. You don't need a third-party app or chrome extension anymore!
From the adminpage, go to settings (bottomleft corner) and go to Metafields. From there, you can add the metafields to the product and set the desired contenttype (inputfield, image upload, checkbox, etcetera)
You will need to provide a namespace and key, which you can refer to from the code template. For instance: setting the "namespace and key" field to my_custom_fields.somefield, you will be able to access it from the product template file (product.liquid) like so:
{{ product.metafields.my_custom_fields.somefield }} or, of course, assign it like so:
{% assign myField = product.metafields.my_custom_fields.somefield %}
The created metafields will appear on the product editpage at the bottom. No chrome extensions needed!!
The accurate answer to your question is NO, You can't
But, the good news is there are some apps to accomplish the result. Here is one of the apps which is free!

Schema.org microdata - Price value not showing in google searchresults

We had tagged our Product Detail web page with the 'Product' microdata. We are trying to show the Price of the item when a particular product is searched for on Google.
We marked up the item's price with the "www.Schema.org/Offers" itemscope and the "Price" itemtype.
See the Rich snippets data for the web page that I am talking about below:
http://www.google.com/webmasters/tools/richsnippets?q=http%3A%2F%2Fwww.mouser.com%2FProductDetail%2FTexas-Instruments%2FTL072%2F%3Fqs%3DE2%2FxqS9xjzrrJtzLbEfvqg%3D%3D
Notice that the "Availability" shows on the search result, but not the "Price".
I remember the same page worked in the past(last year). Wondering if something had changed meanwhile on how Google decided to read the Microdata.
Can anyone please help?
Thanks Y'all
It's because you're missing the priceCurrency. Add this to your offers section
<meta itemprop="priceCurrency" content="USD" />
Thank you for this, btw. I was trying to get mine to show In Stock only, without a price. Your question led to my solution!
I think it's related to the how you have your price property structured.
Look at this example:
Using this url the price shows up as $199 and the price has itemprop="price"
http://www.overstock.com/Office-Supplies/Office-Star-Professional-Air-Grid-Deluxe-Task-Chair/2605023/product.html
But your price varies based on qty.
You may need to create a default price that is displayed for Google (maybe an "as low as")
itemprop="$0.373"
Hope that helps.