12

In Woocommerce, Single product page I have used the 2 different sizes, one for top and other for pant. If the user wants to select pant only pant size select box will show and if the user selects the top size only top size will show and if the user wants to buy the full product both pant and top size will show. Select item has 3 options: Pant, Top, Full.

https://drive.google.com/open?id=17_lJZ1dMnITvW3gQY1ZLNigzZcVMrWDvUA

  • I have just added this attributes in the product and I am trying to add js hide and show on select but it wont work because add to cart will only process if these options are select.@JamesJones –  Aug 07 '17 at 14:49
  • You need to create variations on the backend. – Shahbaz A. Aug 08 '17 at 08:53
  • I have created the variations on the backend. @shazyriver. But If I select pant, the top size should disappear. –  Aug 09 '17 at 10:32
  • Check this http://www.remicorson.com/display-woocommerce-product-variations-dropdown-on-the-shop-page/ https://wordpress.org/plugins/woocommerce-variation-details-on-page-product/ – NewUser Aug 09 '17 at 10:37
  • It wont work @NewUser –  Aug 09 '17 at 11:53
  • @Rahgav can you share some codes? I mean how you are showing and hiding the values? – NewUser Aug 09 '17 at 12:19
  • It's simple a javascript code using hide and show on a select value. @NewUser. and there is no use. –  Aug 09 '17 at 12:22
  • It works if you create variations correctly. you must have missed something out – Shahbaz A. Aug 09 '17 at 13:06
  • Can you provide to us the Theme name you are using also WooCommerce and Wordpress version? – Musk Aug 09 '17 at 16:37
  • I am using the latest version of Wordpress 4.8.1 and the latest version of Woocommerce. @Musk –  Aug 09 '17 at 17:01
  • @Rahgav WC not allow further without selecting variation of product – Mukesh Panchal Aug 10 '17 at 05:41
  • @Rahgav I think you have to write your own custom code. Try using ajax to fetch the product attributes as per the selection what you have made and the product price as well. I am just thinking in that way if you have any other suggestion then please tell. – NewUser Aug 11 '17 at 06:04
  • @shazyriver. Can you tell me that problem? –  Aug 11 '17 at 06:51
  • @NewUser. Can't it be done using the variations.???? –  Aug 11 '17 at 06:54
  • @Rahgav I don't think so. – NewUser Aug 11 '17 at 06:57
  • @NewUser. SO I think Woocommerce should find the solution because If I hide any select box, I am not able to add the product to the cart. We have any other solution or not???? –  Aug 11 '17 at 07:02
  • Just add some attributes and then go to variations tab. There create the variations that you want. That's it. Now the selection on the front end will be according to your variations. If a combination is not present dropdown will repopulate or disappear accordingly. – Shahbaz A. Aug 11 '17 at 07:45
  • There is no option to drop-down will repopulate or disappear. @shazyriver –  Aug 11 '17 at 07:46
  • I think this is the whole question. @LoicTheAztec. –  Aug 14 '17 at 05:08

1 Answers1

2

If I understand the problem correctly, the customer can choose:

      Pant            Top

Option 1 Yes, select size . . Yes, select size

Option 2 Yes, select size . . None

Option 3 None . . . . . . . . . . Yes, select size

The customer would can choose a pant, a top, or both a pant and a top. There is also the implied requirement that a customer can choose to buy a quantity of one, or more than one of the desired selection.

In addition to the user interface problem of the customer selection, you may need to able to clearly communicate to the warehouse which items are picked from inventory and go into the box.

You may also want to discount the price, if the customer buys both a top and pant, or you may want to charge more per item if the customer only buys a top or only buys the pants.

You may also need to calculate shipping costs on the checkout screen. based on different weights and sizes, since the option and quantity chosen will change the weight and volume of the shipment.

You also need to consider if you want the images to change as the customer selects the options from the product selector.


Solution:

There are two extensions you may want to consider, depending on the complexity of the rest of your business rules, the other plugins and custom code on your site, and the other items in your store.

Product Bundles

Composite Products

Both of these are premium plugins from WooCommerce.

Standard disclaimer: I have no affiliation with WooCommerce except as a customer.

JShipC
  • 198
  • 6