custom product options,there price is dependent on another? - php

Is there a way to create custom product options in a way that the one's price is dependent on another (without using the configurable product) ? and i'm using only custom options.
Like for example we have product that have a custom option Print Type a radio input having some options [A-Type, B-Type, C-Type] and one more option Sizes [XXX,XX,X,L,X,S].
And my question: If we change Print Type, the price of Sizes should reflect according to the selected Print Type. Should i have to use a observer to bind option prices to each other or any other method??

Related

Change order of dropdowns on single product page

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!

How to overwrite custom weight for particular product in woocommerce?

I have custom product which is linked to woocommerce products list. I have to add custom weight for that product. I would like to add custom field for particular product in the backend and pull those values in the front end for shipping calculation
For example:
I have template sizes 8*8 = 1KG, 12*12 = 21kg,.... like that i have to add multiple template sizes and i have to show when user selected and 8*8 means the product should pull weight from the backend particular weight. there will not be any additional price for select template sizes
Please advise on this.

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: pass custom value per product in order

I have created custom field (dropdown field) in Magento cart page. User will able to choose any option from this field. I have created this field manually means I didn't use Magento product custom option. My requirement is that now I want to pass the field value whatever the customer wants per product in order.
thanks

Magento: Using one quantity field for all products options?

I'm trying to create a Bundled product in Magento with multiple options.
Each simple product I have is tiered in price.
Example;
Thank You Card Bundled Product ($0)
Dropdown Option 1: Colored Envelopes ($0.90-$0.50 Depending on
Quantity, color in dropdown)
Dropdown Option 2: Size of Card ($3-$2 Depending on Size chosen and
quantity)
Quantity = 0-100
But when you have multiple product options each one has a quantity field they need to fill out, I'd like to just have one field that would represent all the options so the customer doesn't have to fill out multiple boxes and we don't have a problem with people entering different numbers.
Any help would be greatly appreciated! Thanks!
If you have set the "User Defined Qty" to no on each of the associated products then these qty fields are useless anyway.
All you need to do in your current theme is apply a CSS rule to hide these fields. If you are using the default theme then you could apply -
.qty-holder { display: none; }
qty-holder is the class of the span the holds the label and input field for qty of each option.
The bundle itself still has a qty field to buy multiples of the same configuration however its field and qty have a separate class so won't be affected by this rule.

Categories