Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Problem with Graduated Prices (StaffelPreis)


Guest

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

Link to comment
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.

Link to comment
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

Link to comment
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.

Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...