I need some help with the following issue. I use an attribute in the layered navigation which is connected to stock values. The attribute has two options - In stock and All products (which includes out of stock products as well).
Is there any way I can have the In stock option selected by default when an user enters a category page? This way users would view only products which are in stock, but if they want they can select all products and also view the others.
Thanks in advance,
Alex
I think you can check the url after selecting the attribute you want to show in default and pass that url when that category is clicked.
This can be the option.
Related
Does anyone have any previous experience or ideas on how to proceed in the product filtering section by category on the e-commerce site?
Because the filter field in the left menu will vary according to the product category. The memory filter should appear in the phone category, but the body (S,M,L) filter should appear in the t-shirt category. The project was built in Laravel. Options and option values models are available. Should the option_id be added to the category table and set accordingly or manually?
Thanks in advance.
You can use pivot table for this purpose. If each category has its own filters and you have a filter table (you name it option here), you must create a pivot table like category_option to store categoty_id and option_id. This will help you when building filter menu in category page. Next use another table to store product_id, option_id and value for that option to store values for each individual product.
I am trying to change the order of the dropdowns on a variable product in WooCommerce. I want the quantity dropdown to be the first dropdown, and then the variation dropdowns afterwards.
Here is what it looks like now:
I know my way around PHP, MySQL, and some other languages, but I haven't written any custom code yet.
Any suggestions would be outstanding.
You can do this using WooCommerce attributes.
Go through Products > Attributes , in your dashboard.
Select your attribute (eg. Variation Option1) ,
There's an option called "Default sort order", change it to "Custom Ordering".
Go to your product edit page,
In product data section, Attributes tab, change the order of attributes using drag and drop
Save your product
Done!
I'm looking for a way to show a custom page with products on it. This is the case:
In an older version of the webshop there were 2 pages. The first one was 'promoties.html' for Dutch and 'promotions.html' for English. They were in the table pp_core_url_rewrite like this:
The category 13 was a category named promotion and all linked products to this category where promotion products.
The categories in the new version are changed and we don't have promotion category anymore. We can now set an attribute named promotion of an article to true or false.
But now I would like to know how I can make the promotion pages work again with selecting all the products where the attribute promotion is true. But I don't really know how to start with this, can anybody help me on my way?
As i think you know how to create product attribute using admin panel in magento. Create a promotion attribute of a product first .Then Using the query update the product attribute to true or false in previously created products as required .Then you can show the products on the basis of that attribute in promotion pages store wise.
I have a Question regarding Product attributes.
Generally Products attributes display in a drop down, when you select attribute from the drop down it will show an add to cart button. This is the Woo-commerce default flow of attributes.
Now my question is that I don't like to display attributes in a select box. I would like to display as my layout.
For example, we have size attributes in Product and that will display in the select box, but I want to display in circle designs. I don't want to display as a drop down.
Yes you can do this. you can get all your product variations using
$product->get_available_variations() It'll return an array containing all your product variation data. When user selects an option woocommerce updating an input value with the selection. It's a hidden input in your source. You need to find that input field and update it's value. I normally use jquery for that.
Hope it'll help.
Thanks.
Click here for screenshot
As you can see in the SS above, only one of the products in my category is being shown on the view. BUT notice that it says there are 3 items in the category. Any thoughts on how to fix this would be greatly appreciated. And before you say it, I have already tried all the following standard fixes that can be found on google such as:
The products must be Visible in Catalog.
The products must be Enabled.
Product must have a stock Quantity.
The product must be set to In Stock. If the product is set not to
track stock, it still has to have a stock Quantity and be set to In
Stock.
The product must be assigned to the target Category.
If using multi-website mode (or if you imported the products through
Data Flow), the products must be assigned to the target Website.
You must refresh your Cache / Indices, just to make sure.
Make all category anchor(is_anchor=1) is yes ,from design of tab category
and set store id to all Products
And Re indexing all index from Admin>system>Index management
Products will also not show up if you upload new products and missed the 'URL Key' field. Filling in this field will add the product to the category page.