Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Discount Pricing for Items Bought In Quantity


Guest

Recommended Posts

Posted

I have been shifting thru all the different threads looking for the exact fix for my problem and I see variations to my problem but not an exact fix. So I come to all the Gurus of OSCommerce for help. Here is my problem.

 

My store needs to be able to give a discount to a customer who buys more than one product in a specific category. For example, All products in this category are listed at $100.00. If a customer buys one item the price will be $100 of course. Now for each additional item bought under this category the price should be $25 each. So there should be a 75% discount for each item bought after the first item.

 

I have found a contribution patch that applies the discount to all the items in the cart instead of leaving the first item at its original price and then discounting each additional item. The contribution thread is located here: Quantity Discounts

 

Does anyone know a way for me to configure the order_total modules to work the way I need it to? Or if there is a different way of doing this that doesn't require a contribution patch? Any help would be greatly appreciated. I have been stumped on this for months and my client is getting a lil agitated.

Posted

I believe I am on the right track to solving this problem. I was told that I need to use the "Quantity Price Breaks Per Product" contribution to get what I need done. The only problem that I have with this is the fact that I do not have access to the patch command so I can not run the patch that comes with this contribution(1242). Did anyone else have the same problem that I'm having and is there a work around if you cant patch something? Thanks.

Posted

Hello.

 

Yeah, I think that the price-break patch is what you are looking for.

 

I'm lucky enough to work with an OS that has 'patch' installed by default, so I don't know if this works, but the README has very clear instructions for cases such as yours. Read it all the way through the file, with a particular focus on the area around:

 

If you do not have access to the 'patch' command.  You can find this a

version of MS2 code with this patch installed at...

 

;)

 

Regards,

Pat Deegan

Posted

Pat-

 

I know exactly where your going with this. I downloaded the entire site that had this contribution installed but I do not know which files need modification. Any help on this?

Posted

I want to add this to...I am sorta peeved at the guy who contributed this. Forcing users to use PATCH is about the worst way to add a contrib. Also I see that in his readme he lists files that need changing..

 

Files Modified by this module

catalog/admin/categories.php
catalog/admin/includes/languages/english/categories.php
catalog/includes/application_top.php
catalog/includes/classes/PriceFormatter.php
catalog/includes/classes/shopping_cart.php
catalog/includes/languages/english/product_info.php
catalog/includes/modules/product_listing.php
catalog/index.php
catalog/product_info.php
catalog/stylesheet.css

 

Is it me or is catalog/includes/classes/PriceFormatter.php

a non-existant file?

 

Maybe I will take some time and attempt to clean up his DIFF file into an easier to read install file. Personally I wouldnt trust a diff file with OSC...if you have even one contrib installed you can forget that idea.

  • 4 weeks later...
Posted
Maybe I will take some time and attempt to clean up his DIFF file into an easier to read install file.

Just curious, did you ever get a chance to try this?

Rule #1: Without exception, backup your database and files before making any changes to your files or database.

Rule #2: Make sure there are no exceptions to Rule #1.

Posted

I went ahead and compared Andrew Baucom's complete MS2 code to the standard MS2 release and documented the changes in a file by file change format. I posted it to the contribution:

 

http://www.oscommerce.com/community/contributions,1242

 

I made no changes and I don't pretend to understand all the coding. I am a novice when it comes to PHP.

Rule #1: Without exception, backup your database and files before making any changes to your files or database.

Rule #2: Make sure there are no exceptions to Rule #1.

Posted

hi,

 

i installed this very good contribution.

but it does not work for me...

 

the total prices do not display in the catalog and i cannot edit the discounted prices in my existing products.

view at www.it-factor.nl/catalog

 

maybe it's because of my othe contributions, gift vouchers, multiple stores etc.

is this contribution we're talking about well tested on MS2?

Posted

First let me preface by saying that I am not a PHP expert and don't have a working knowledge of the inner workings of the contribution. I simply compared the code in Andrew's complete MS2 store example to stock unmodified MS2 code and documented the changes. Your question may need to be addressed by the contribution's author, Andrew Baucom. His email address is included in the original contribution files.

 

That said, I can tell you that it works in the MS2 store that I am constructing. That store has many contributions installed. It is under development, but you can see what the contrib looks like in action here: http://www.sullisys-ihs.com/viphotos/catal...&products_id=31

 

I did find a comment that had only one forward slash in shopping_cart.php, but since the comment line exists correctly in the standard MS2 code, it is likely that only the line of code under it would be pasted into the target store. Just in case, here is the code I am referring to:

 

Find:

 

// products price

? ? ? ? $product_query = tep_db_query("select products_id, products_price, products_tax_class_id, products_weight from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'");

? ? ? ? if ($product = tep_db_fetch_array($product_query)) {

 

Change to:

/ products price

? ? ? ? if ($product = $pf->loadProduct($products_id)){

 

Should read as:

// products price

        if ($product = $pf->loadProduct($products_id)){

 

You mentioned discounted prices. The contribution works with the special prices feature. However if you have any other mods that altered the pricing functions then that could be the problem.

 

I wish I could be of more help.

Rule #1: Without exception, backup your database and files before making any changes to your files or database.

Rule #2: Make sure there are no exceptions to Rule #1.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...