Forums / Managing Customers and Orders / is there a way to calculate prices based on length, width and hright?

is there a way to calculate prices based on length, width and hright?

Started by denniszc on 11 Mar 2013, 9:03 AM · Views: 6,140

Results 21 to 22 of 22
13 Mar 2013, 8:33 AM
#21
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

is there a way to calculate prices based on length, width and hright?

denniszc:

okay, this is abit of a really crude and forceful way, but i manage to add a text that can calculate the price based on widthxlengthxheight (or any 4th dimensional attribute you'd like)

Thanks for sharing. It's this type of thing that helps ZenCart stand head and shoulders above the rest. :)

Cheers
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

13 Mar 2013, 9:51 AM
#22
denniszc avatar

denniszc

New Zenner

Join Date:
Mar 2013
Posts:
95
Plugin Contributions:
0

Re: is there a way to calculate prices based on length, width and hright?

okay, another update for you guys, this time i made the calculation compatible with easy populate. since easy populate only allows you to insert values for the +- price section, you cant use my previous method to insert prices for your products, so i made it so that the price per word reads price not from the price per word section, but from the +- price section, anyway go to zencart/includes/classes/shopping_cart.php and go to line 745, look for the code below:

$text_words = zen_get_word_count_price($this->contents[$products_id]['attributes_values'][$attribute_price->fields['options_id']], $attribute_price->fields['attributes_price_words_free'], $attribute_price->fields['attributes_price_words']);

change 'attributes_price_words' to 'options_values_price' and you will use the +-prices for the price per word calculation