Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

special prices displayed without VAT on leguide csv


Davelaar

Recommended Posts

I've put this script on my website to create a feed for Leguide.com. It works well, but the special prices are displayed without tax. The normal prices are displayed including tax. How can I change this. I've put the code here. I'm using OSC 2.3.3 I've also put the whole .php script as an attachment.

// Détection des discount price.
$special_query = tep_db_query ('SELECT specials_new_products_price FROM ' . TABLE_SPECIALS . ' WHERE products_id = \'' . $products['products_id'] . '\' AND status = \'1\' ;') ;
if (!$special_result = tep_db_fetch_array ($special_query))
$special_result['specials_new_products_price'] = '' ;

// Calcul des prix.
$regular_price = tep_add_tax ($products['products_price'], tep_get_tax_rate ($products['products_tax_class_id'])) ;
$regular_price = round ($regular_price, 2) ;
if ($special_result['specials_new_products_price'] == '' ) {
$discount_price = '' ;
$sales = 0 ;
} else { //Le produit est en promotion.
$discount_price = round ($special_result['specials_new_products_price'], 2) ;
$sales = 0 ; //Si les promotions sont des soldes, modifiez cette valeur par 1 pour la 1ère démarque, 2 pour la 2ème démarque.

I don't understand the most of what I'm reading but I do know how to read and copy/paste

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