hgrzesiek Posted May 14, 2007 Share Posted May 14, 2007 Hello I wasn't sure where to write about this so i decided to do it here. My store is not selling products itself, there are more like services. This is waste collection store so the products is going to be for example bin services (lifts). What i'm trying achieve i'm going to show on example: Customer needs to get 2 bins collected 3 times a week. It means that he is going to have 6 lifts (2 bins*3 lifts). My question is how can i do it? I have added the number of lifts as a product attribute but the only prefixes i can use there is + and -, and in my store the price depends of the number of lifts multiplied by number of bins (like in example). I don't know if it makes sense to anyone but if it does i would love to hear any suggestions about it. Thank you in advance Link to comment Share on other sites More sharing options...
hgrzesiek Posted May 16, 2007 Author Share Posted May 16, 2007 Hi again. I still couldn't solve this problem. I think it has something to do with the product attributes prerfixes ('+' and '-'). I' ve searched the forum for it a nd the only thing i could find was the code which is responsible for the prefixes in the shopping cart admin\includes\classes\shopping_cart.php(around Line 224): if ($attribute_price['price_prefix'] == '+') {//tutaj zmieniamy $this->total += $qty * tep_add_tax($attribute_price['options_values_price'], $products_tax); } else { $this->total -= $qty * tep_add_tax($attribute_price['options_values_price'], $products_tax); } admin\includes\classes\shopping_cart.php(around 242): if ($attribute_price['price_prefix'] == '+') { $attributes_price += $attribute_price['options_values_price'];//tutaj dodamy mnozenie } else { $attributes_price -= $attribute_price['options_values_price']; } includes\classes\shopping_cart.php(around 272): if ($attribute_price['price_prefix'] == '+') { $this->total += $qty * tep_add_tax($attribute_price['options_values_price'], $products_tax); } else { $this->total -= $qty * tep_add_tax($attribute_price['options_values_price'], $products_tax); } includes\classes\shopping_cart.php(around 290): if ($attribute_price['price_prefix'] == '+') { $attributes_price += $attribute_price['options_values_price']; } else { $attributes_price -= $attribute_price['options_values_price']; } I've tried to add multiplying prefix ('*') so for example the if condition would look like this if ($attribute_price['price_prefix'] == '+') { $attributes_price += $attribute_price['options_values_price']; } else if($attribute_price['price_prefix'] == '*'){ $attributes_price *= $attribute_price['options_values_price']; } else { $attributes_price -= $attribute_price['options_values_price']; } but it didn't work, acctually it did nothing. I know it is just a simple math but i have no clue where to change the code to acchieve price multiplied by the product attribute (for example 10$ * 2 =20$). Please help or just show me right way to do it. It's really important to me, i would really appreciate it. Link to comment Share on other sites More sharing options...
hgrzesiek Posted May 17, 2007 Author Share Posted May 17, 2007 Anyone? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.