Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Maths help needed...


CC

Recommended Posts

Hi peeps.

 

It is a strange thing, but I have been using a math calculation to add a second price onto my product info page for 'VAT Inclusive' price.

We need it here in the UK.

 

It has worked fine for some months now, but...

I have now recreated my site using the latest snapshot for the new checkout mod, and since I have put this back in the calculation does not want to work.

 

Take a look at this:

                            <tr> 

                             <td width="3" height="19"></td>

                             <td width="6"> </td>

                             <td width="17" align="right" valign="bottom" nowrap><div align="center"><span class="pricesize"><?php echo $products_price; ?></span></div></td>

                             <td width="2"> </td>

                             <td nowrap> <span class="stdValues">ex VAT</span></td>

                           </tr>

                           <tr> 

                             <td height="19"> </td>

                             <td colspan="3" align="right" valign="bottom" nowrap><div align="center"><span class="pricesize2">£<?php echo number_format(($product_info_values['products_price']*(1.175)), 2, '.', ''); ?></span></div></td>

                             <td nowrap><span class="stdValues">inc VAT</span></td>

                           </tr>

 

That is what I have on my product_info.php page, and on the new snapshot the math calculation does not work.

 

Can someone tell me if they know why?

I have been trying to find the reason why this wouldnt for a few hours now, and it is beating me!

 

Hope you can help.

 

CC.

Link to comment
Share on other sites

Just as an added note I have this on my featured_products.php page.

 

And this also will not work:

<td><span class="priceText">' . $currencies->display_price($featured_products['products_price'], tep_get_tax_rate($featured_products['products_tax_class_id'])) . '</span><span class="smallText2"> ex VAT</span> <span class="priceText3">(' . $currencies->format($featured_products['products_price']*(1.175)) . ' inc VAT)</span></td>

 

This is weird, cos I have my old site still running, and on there this maths calculation works fine.

But the new snapshot is stopping it somewhere.

 

CC.

Link to comment
Share on other sites

:oops: :oops: :oops: :oops: :oops: :oops: :oops:

 

Please dont anyone tell anyone else.

 

I hadnt noticed that this

  define('DISPLAY_PRICE_WITH_TAX', false); // Display prices with tax (true) or without tax (false)

 

was still set to 'true'.

I wont tell if you dont.

 

Thanks anyway peeps.

CC.

Link to comment
Share on other sites

I do this because I need to attract both B2B sales and B2C sales, so I have the easy on the eye option of both ex VAT and Inc VAT.

 

No other reason, but just to have it look functional.

Also my business competitors all have this option, so I need to make sure I keep up with the jones'.

Link to comment
Share on other sites

yes mate.

 

The 2 examples above can be seen here:

 

Products Info page:

http://www.casetech.co.uk/store/product_in...?products_id=26

 

Featured Products: http://www.casetech.co.uk/store/featured_products.php

 

New Products is the same as featured products.

But it is a big plus point for customers of both business and consumer ilk.

 

CC.

Link to comment
Share on other sites

I meant to say the 2 examples of code above can be found at those 2 links I posted.

 

But I'm sure you know what I mean. :wink:

 

Besides I know you know enough to not need my help. :D

 

CC.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...