Hi, I was looking for a way to add more products in 'Deal' content type. I change the product reference field to more than 1. But it always return in error :
Fatal error: Call to a member function value() on a non-object in xxx/profiles/opendeals/modules/custom/opendeals_module/opendeals_module.module on line 166

opendeals_module.module on line 166 is :
$stock = $wrapper->field_product->field_stock->value();

My Questions are:
1. Any chance that I can add more products options/variant ?

2. I want to create many different products into Product Type so I need many product options. Can I have many different options for 1 product type ?

3. I had tried to use Commerce Product Options, but I cannot set the price individually per product option/variant. What is the proper way to have many product options and set different prices individually ?

Example: I want to sell Theatre X voucher that has options:

  • VIP Seat $500
  • Front Row $200
  • Mid Row $120

I also want to sell Beauty Salon voucher that has options:

  • Cut Only $100
  • Cut + Blow $200
  • Spa $120
  • Cut + Spa $160

Thank you.

Comments

yannisc’s picture

Have you accomplished what you ask for?

yannisc’s picture

Status: Active » Postponed (maintainer needs more info)
mindhunter75’s picture

I really would like to know a solution too!

Subscribing...

moshikoh’s picture

Hi,

There is a solution for that, just change the lines to:

	$stock = $wrapper->field_product[0]->field_stock->value();
	$sales = $wrapper->field_product[0]->commerce_sales->value();

when there is more then one product the var "field_product" turn into array.

now it will support more then one product.

you can see example here:

http://www.kideals.co.il/%D7%91%D7%95%D7%91%D7%95%D7%AA-%D7%A7%D7%98%D7%...

mindhunter75’s picture

Hye Moshikoh,

This works! only one problem....

The "discount" and the "you save" fields are not responding when i choose another product from the dropdown reference.

Only "From price" "too price" changes in the AJAX.

Any idea how to fix this?

At least i'm a step further! thank you!

abhishek.inext’s picture

Status: Postponed (maintainer needs more info) » Active

Hello All,

I am also stuck at the last point where:-

The "discount" and the "you save" fields are not responding when i choose another product from the dropdown reference.

I am not getting which Ajax file is returning the other values, I am newbie to Drupal.

Please provide me some information for the same.

Waiting to hear back soon.

Thanks
Abhishek Arora

abhishek.inext’s picture

Issue summary: View changes

Add more words, hope to make it more clear.

varsharya’s picture

Issue summary: View changes

When considering multiple products or product attributes, it is important to carefully analyze the specific features and variations within each product category. This involves a detailed examination of the distinct characteristics, functionalities, and specifications of each product, as well as an assessment of how these attributes align with the preferences and needs of the target audience. By comprehensively evaluating the diverse elements and qualities associated with multiple products, businesses can effectively position their offerings in the market, make informed decisions about product development and marketing strategies, and ultimately enhance the overall competitiveness and appeal of their product portfolio.

International Spa and Beauty Award is recognized across the world as the hilltop of success in the spa and beauty sector.It is done by recognizing industrious Spa businesses all around the world who work tirelessly to provide excellent TLC for all clients but without getting recognition for the immensely enormous task they do.These prestigious awards highlight excellence in various categories, including spas, beauty products, and wellness retreats. With a focus on innovation, quality, and customer satisfaction, the International Spa & Beauty Awards serve as a benchmark for industry leaders, providing recognition and validation for their exceptional contributions.