ezosC v2.1 is a turnkey e-commerce online store business solution based in osCommerce 2.2 RC 2a with a full supported IT and tech support staff.  ezosC v2.1  can be customized for any business’ needs with its open source. We have added additional functionality to this store by adding modules for every business to profit from. You need to have the edge over your competition with modules that will set you apart from the rest.

After years of experience developing and repairing shopping carts, we have developed the functionality of the carts that we have made for the various clients, in one great e-commerce solution. From turnkey apparel e-commerce stores and automotive online stores, to reservation systems e-commerce and book online stores, we have developed the ultimate online shopping experience for your customers. Read more

Click here for more information

 
Call Now 1.800.961.7427

 

Complete eCommerce Solution
Based in osCommerce

Help - Search - Members - Calendar
Full Version: Custom attribute prefix
osCommerce Community Support Forums > osCommerce Online Merchant v2.x > Contributions / Add-Ons > Order Total Modules
zeldaz
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:
CODE
            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 smile.gif
burt
What you have done works OK in my test shop. Where is your problem arising?
zeldaz
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.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.
Powered by osCommerce.com | Oscommerce Forum