Woocommerce - How to select multiple value in attributes ? - php

My first type of product is variable product with attributese.
My second type of product is a box with several products. As I don't have stocks, I thought that the choice of products to put in the box, I could set attribute.
The problem is that on a product page you can select one attribute at a time. I need the client to select five attributes at once !
How can I do to "allow" the selection of multiple attributes ?
Thanks

Related

woocommerce different prices based in weight

It is posible in woocommerce to create different prices based in weight to display in a select dropdown?
For example:
food for dogs:
5k = $20
10k = $40
20k = $60
It is possible in WooCommerce to create different prices based on weight -
In Variable products in WooCommerce that lets you offer a set of variations on a product, with control over prices, stock, image and more for each variation.
Step 1- Set the product type
Go to: WooCommerce > Products.
Select the Add Product button or Edit an existing product. The Product Data displays.
Select Variable product from the Product Data dropdown.
Step 2- Add attribute.
Go to : Products > Attributes
Then give name attribute.
Save.
Then select on weight attribute.
Add sub-attribute in weight attribute (5k,10k,15k).
Step 3- Add attributes to use for variations
Go to : Products
Then select product you set as variable product in step 1
Select Attributes then select Custom product attribute(that is weight), and Add.
In weight select sub-attribute.
Then Select check box used for variation.
Save attribute.
Step 4. Add variations
Goto:Variations Select Add variation from the drop-down menu, and click Go
Select attributes for your variation. To change additional data, click the triangle icon to expand the variation.
Edit Price for each attribute.
Save Changes.
Read more: https://docs.woocommerce.com/document/variable-product/
Watch this Video- https://www.youtube.com/watch?v=iUcAf89LfCc
https://www.youtube.com/watch?v=aen8ieJuB88
Step 1: Go to product edit page, for which you like to set prices based on weight.
Step 2: Select Product Type as a variable product, see the image below. Create product attribute, save the attribute. I named the attribute weight .
See the image below:
Step 3: Now we need to add product variation, see the image below:
Step 4: For each of these variation, u can set any prices you want, see the image below
Step 5: update the product, that's it.

Woocommerce Product Variations attributes

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.

Magento product availability in defined PIN codes only?

I have a Magento based site and Products are limited to Set of Pin codes. These PIN differ from product to product. What I need is to get an option to input set of PIN Codes, while defining a product. And on every product page there must be a Text field to check whether the product is available for the PIN Code, which is entered by the visitor.
HI For this first of all
1 create a new product attribute with multi-select type
2 assign all pin codes in there values under attribute options
3 assign that attribute to the desired attribute set
4 than for assigning attributes you need to go to product section and assign a desired zip options for that particular product from the multi-select attribute
5 on product page you need to problematically get all the selected values of that attribute
6 create a array of that values
7 create a simple form and when user post some value in that form , match that value in the array you defined above.
8 if the value finds in array than show the cart button and if not do what you want.
i hope this will give you a very fair idea. Let me know if i can do any other thing for you.

Magento - set default filter in layer

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.

Magento Checkbox for bundle products needs qty

With a bundled product in magento you can select various types of options - drop down for example adds a Qty box so you may choose the quantity of items from the drop down.
I am using Checkboxes instead as i need many choices and need a Qty box associated - how is this possible? I've spent hours trying to code this.
If you use a radio button you can allow user defined qty

Categories