zeldaz Posted May 10, 2008 Posted May 10, 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.
♥geoffreywalton Posted May 10, 2008 Posted May 10, 2008 Have you thought of using the qty field to represent the no of days? Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile Virus Threat Scanner My Contributions Basic install answers. Click here for Contributions / Add Ons. UK your site. Site Move. Basic design info. For links mentioned in old answers that are no longer here follow this link Useful Threads. If this post was useful, click the Like This button over there ======>>>>>.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.