zeldaz Posted May 8, 2008 Share Posted May 8, 2008 Hi there, I guess you all know that when you add a product attribute you can choose the prefix of + or -, but at the moment I am in need of * (times/multiplication). I wish to make a sort of rental modification in that people can order products and each product will have a Days attribute and they can order it for a certain amount of days. If I enter the price of the product if renting it for 1 day, I can simply have the attribute set to * so that if they choose 4 days for example it will times the product amount (which is equal to one day) by 4 to get the total for the amount of rent. I have edited the files: includes/classes/shopping_cart.php and admin/includes/classes/shopping_cart.php The edits: if ($attribute_price['price_prefix'] == '+') { $this->total += $qty * tep_add_tax($attribute_price['options_values_price'], $products_tax); } elseif($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); } This then works for the shopping_cart pages but nothing else and the product attribute is having no effect else where. I need someone experienced to help me out on this one. Possible payment for solution may occur. Thanks all :) Quote Link to comment Share on other sites More sharing options...
zeldaz Posted May 8, 2008 Author Share Posted May 8, 2008 When you go and checkout the totals in the checkout are not being multiplied so the customers are only purchasing 1 day even though they have the attribute Days set to 3 for example. Also once the order is placed in the admin backend when you look at it it is not being multiplied as well. Quote Link to comment Share on other sites More sharing options...
addoughty Posted July 17, 2011 Share Posted July 17, 2011 Did any one ever find a solution to this? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.