Jump to content
Sign in to follow this  
apxmaster

Problem with Graduated Prices (StaffelPreis)

Recommended Posts

after installing the contrib, all my products that have NO graduated prices, shows 0 in the shopping cart.

 

is there a possibility to change the contrib in that way that it shows graduated prices only for that products, which i have set ?

 

thx

Share this post


Link to post
Share on other sites

Same problem, found the solution:

 

open includes/classes/shopping_cart.php

 

find the lines off this add-on:

 

replace the first lines with:

 

$rabatt_query = tep_db_query("select quantity, unitprice from " . TABLE_PRICES . " where products_id = $prid " . " and quantity <= $qty order by quantity desc");

if( tep_db_num_rows($rabatt_query))

{

$rabatt_price = tep_db_fetch_array($rabatt_query);

// $products_price = $rabatt_price['unitprice'] * (1 + $products_tax/100);

if ($rabatt_price['unitprice'] != '0.0000'){

$products_price = $rabatt_price['unitprice'];

}

}

 

note the line that shows: "if ($rabatt_price['unitprice'] != '0.0000'){"

only when the unitprice is more than 0.0000 than the script has to change the value of products_price to the staffelpreis.

 

for the second group of lines this is the same solution:

 

// Start www.TheWebSite.de - Aenderung Staffelpreise

 

$qty = $this->contents[$products_id]['qty'];

$rabatt_query = tep_db_query("select quantity, unitprice from " . TABLE_PRICES . " where products_id = $prid " . " and quantity <= $qty order by quantity desc");

if( tep_db_num_rows($rabatt_query))

{

$rabatt_price = tep_db_fetch_array($rabatt_query);

// $products_price = $rabatt_price['unitprice'] * (1 + $products_tax/100);

if ($rabatt_price['unitprice'] != '0.0000'){

$products_price = $rabatt_price['unitprice'];

}

}

// ENDE der Aenderungen www.TheWebSite.de

 

and it's fixed.

 

good luck.

Share this post


Link to post
Share on other sites

On a similar topic, does anyone know how to modify the code so that the text only appears in the item description if there is a graduated discount? By default, you get the text saying "Graduated Prices" (or whatever you have changed it to) and then...no prices! I guess it needs an "if" clause around the output, based on the number of records retrieved...no records = no text.

 

I'm sorry , PHP isn't in my bag of skills!


Many Thanks,

 

Steve

Share this post


Link to post
Share on other sites

Normally Specials and Staffelpreis will not work together.

However, it can be done with a lot of coding. If it's still a problem for you,

please e-mail me so i can explain how it can be done. It will only work when you enter a percentage to deduct at the Specials module.

Share this post


Link to post
Share on other sites

Erwin, I was wondering if that offer applies to all. I have a rough idea of how it might be done (staffelpreis and specials), but what I am thinking might be more than is necessary. Can you send me examples or a description of what you've done? Thanks.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×