Post by earink » Tue Nov 22, 2011 7:58 am

anyone know how to multiply several options * original $price?

I'm trying to get a multiply option 1 against option 2 against original $price

[Length (option 1) x Width (option 2)]*original price?

thanks for anyone that reads this and helps

------------------------ solved ------------------------

Newbie

Posts

Joined
Tue Nov 15, 2011 3:25 am

Post by Sonal2012 » Wed Jan 25, 2012 4:47 pm

hey
have you been able to figure it out
im stuck with the same problem
any help will be appreciated

thanks in advance
sonal

Newbie

Posts

Joined
Wed Jan 25, 2012 4:26 pm

Post by digitaldept » Tue Sep 04, 2012 9:18 pm

I'm curious how you solved this? Can you share?

New member

Posts

Joined
Fri Aug 31, 2012 12:12 pm
Location - Ohio

Post by billynoah » Wed May 29, 2013 3:31 am

Why is this marked as "Solved" but no solution is offered?

Image


User avatar
Active Member

Posts

Joined
Tue Jan 15, 2013 12:46 pm

Post by digitaldept » Wed May 29, 2013 7:39 am

billynoah wrote:Why is this marked as "Solved" but no solution is offered?
Good question.

New member

Posts

Joined
Fri Aug 31, 2012 12:12 pm
Location - Ohio

Post by billynoah » Fri Jun 07, 2013 6:29 pm

in case anyone is interested, i finally managed to get multiplication working. here's what i did:

edited:
/admin/view/template/catalog/product_form.tpl
added code to create "*" option for price modifier

/system/library/cart.php
added code to deal with calculations:

Code: Select all

elseif ($option_value_query->row['price_prefix'] == '*')
	{$option_price = (($option_price + $product_query->row['price']) *
	$option_value_query->row['price']) - $product_query->row['price'];
	}
/catalog/controller/product/product.php
changed code to omit price modifier from drop down when multiplication is selected
(otherwise you end up with a price modifier option like "Orange (+$2.00)" when in fact it is set to 2x (Double Price). how you display this would be a preference.

not sure if my code is the most awesome thing ever but it's working fine for me. hope this helps.

Image


User avatar
Active Member

Posts

Joined
Tue Jan 15, 2013 12:46 pm
Who is online

Users browsing this forum: No registered users and 7 guests