Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Price breaks with only one level shows two prices


TomH73

Recommended Posts

Hi,

 

I have installed - Quantity Price Breaks (for Separate Pricing Per Customer) and I have a small problem.

Products that only have one Price level (break) show up in the product listing as:

 

<Product name> ? 12,95 - ? 12,95

 

and I would like to show only one price if there is only one price break and the prices are the same.

Who has a solution for this problem?

 

Please help.

 

Kind Regards,

 

Tom

Link to comment
Share on other sites

I have installed - Quantity Price Breaks (for Separate Pricing Per Customer) and I have a small problem.

Products that only have one Price level (break) show up in the product listing as:

 

<Product name>    ? 12,95 - ? 12,95

 

and I would like to show only one price if there is only one price break and the prices are the same.

Who has a solution for this problem?

The simplest solution would be to remove the price break if the prices are the same ;)

 

I guess you got your reasons for doing this.

 

I haven't tested this, but if you look for the function getPriceStringShort() (close to the bottom of includes/classes/PriceFormatter.php) you will find:

      if($this->hasQuantityPrice == true) {
$lc_text = ' '
  . $currencies->display_price($this->lowPrice,
          tep_get_tax_rate($this->taxClass))
  . ' - '
  . $currencies->display_price($this->hiPrice,
          tep_get_tax_rate($this->taxClass))
  . ' ';
     }

I guess that if you change the first line in that piece of code to:

      if($this->hasQuantityPrice == true && ($this->lowPrice != $this->hiPrice) ) {

it wouldn't happen anymore.

Link to comment
Share on other sites

Hi,

 

I still get the same result.

Maybe I am not clear; in the product detail page (product_info.php) everything is fine. It is the product listing where it shows:

 

<image> <description> ? 1,51 - ? 1,65

 

<image> <description> ? 1,10 - ? 1,10

 

 

instead of:

 

 

<image> <description> ? 1,51 - ? 1,65

 

<image> <description> ? 1,10

 

This I want to change, but I don't know where (in index.php ? or product_listing.php??)

 

Please help!

 

Kind regards,

 

Tom

Link to comment
Share on other sites

I still get the same result.

Maybe I am not clear; in the product detail page (product_info.php) everything is fine. It is the product listing where it shows:

 

<image>    <description>    ? 1,51 - ? 1,65

 

<image>    <description>  ? 1,10 - ? 1,10

instead of:

<image>    <description>    ? 1,51 - ? 1,65

 

<image>    <description>    ? 1,10

 

This I want to change, but I don't know where (in index.php ? or product_listing.php??)

Strange, because in the includes/moduels/product_listing.php that function is called:

         case 'PRODUCT_LIST_PRICE':
           $lc_align = 'right';
   // commented out code removed
           $pf->parse($listing[$x]);
           $lc_text = $pf->getPriceStringShort();
           break;

Link to comment
Share on other sites

That piece of code works fine in my test shop. Of course the low and high price should be the same in all 4 decimals, otherwise you could still end up with what you see. But as you said, the low and high price are the same, so that shouldn't be a problem.

Link to comment
Share on other sites

That piece of code works fine in my test shop. Of course the low and high price should be the same in all 4 decimals, otherwise you could still end up with what you see. But as you said, the low and high price are the same, so that shouldn't be a problem.

 

 

Hi JanZ,

 

I don't know what happened earlier, but it works perfectly now, with your adjustment.

Thank you very much for your help.

 

Kind regards,

 

Tom

Link to comment
Share on other sites

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...