Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Seperate Pricing Per Customer v3.5


scendent

Recommended Posts

Thanks Jan,

 

I've just realised from the code that you recommend that I have been confused between CUSTOMERS with an S and CUSTOMER without an S.

In the customers_group table in the database the field is customers_group_show_tax (customers with an S) but in the code from includes/functions/general.php there is no customers with an S.

I'll let you know how it works out now.

Link to comment
Share on other sites

I've added the code you recommend but now the shipping price on the Order Confirmation page always excludes tax (before it always included tax) no matter what the group setting for display tax is.

How can I see the value of DISPLAY_PRICE_WITH_TAX, $tax and $customer_group_show_tax at this point in the execution of the code?

Link to comment
Share on other sites

Would anyone know how to write code that allows customers to be automatically added (without approval) to a specific customer group when they enter in a specific tax id number?

You can add that kind of logic to create_account.php. Normally the customer group id is left to the default database setting of zero. But if you add code to check on certain things you can add a value for it there. This has come up a few times in the forum. Perhaps you can find examples back in this long thread.

Link to comment
Share on other sites

if (DISPLAY_PRICE_WITH_TAX == 'true') $order->info['shipping_cost'] += tep_calculate_tax($order->info['shipping_cost'], $shipping_tax);

Haven't tested this yet but in modules/order_total_ot_shipping.php I changed the first lines of the function process() to:

 

   function process() {
     global $order, $currencies;

     if (!isset($_SESSION['sppc_customer_group_show_tax'])) {
       $customer_group_show_tax = '1';
     } else {
       $customer_group_show_tax = $_SESSION['sppc_customer_group_show_tax'];
     }

 

Then the line with DISPLAY_PRICE_WITH_TAX to:

 

         if (DISPLAY_PRICE_WITH_TAX == 'true' && $customer_group_show_tax == '1') $order->info['shipping_cost'] += tep_calculate_tax($order->info['shipping_cost'], $shipping_tax);

 

Logic says this should work but of course it needs testing.

Link to comment
Share on other sites

Would anyone know how to write code that allows customers to be automatically added (without approval) to a specific customer group when they enter in a specific tax id number?

 

I have been looking for the same solution. Have looked through this forum and not found anything. Pity us non php programmers :'(

 

Specific needs involve that if a Company Name and Company tax Id have been entered, then a lookup for both values is done on a new table. If the value pair exists in this new table, then the new customer is assigned to a particular group. THX.

Edited by Jan Zonjee
Link to comment
Share on other sites

Hi,

 

I'm having a nightmare trying to get the prices to display with tax for my retail group.

I've checked all settings searched the forum for a solution etc all to no avail.

 

It is driving me mad!!

 

hope somebody can point me in the right direction.

 

Cheers

Terry

Link to comment
Share on other sites

Please provide more information.

Do you have an SPPC group called retail?

Have you followed all SPPC installation instructions?

In the admin > My Store page do you have "Display prices with tax" set to true?

This should always be set to true for SPPC.

In the admin > Customers > Customers groups > Retail page have you set "Show prices with/without tax " to "Show prices with tax"?

Have you set the correct prices for your items?

Do you have a group for which prices are displayed without tax?

If so, is the correct price being displayed for this group?

Link to comment
Share on other sites

Hi all,

 

Ok tired of racking my brain on this one. So I am coming to the pros for some help. I have searched and read this thread here for several hours and have tried a few things mentioned (one is listed below) and still cannot get this error to go away.

 

Noticed when I clicked on an item that has attributes assigned to them and added to the cart I get this error message: Fatal error: Call to undefined method currencies::calculate_price() in /home/blahblah/public_html/store/includes/classes/shopping_cart.php on line 428. Line 428 is:

 $this->total -= $currencies->calculate_price($attribute_price[$n]['options_values_price'], $products_tax, $qty);

 

One thing I did notice in my shopping_cart.php file that was not there is:

function calculate() {
global $currencies, $customer_id, $sendto, $ship_zip;

 

The function calculate was there but none of the rest. So I added the rest to the code and it is still not making any difference or resolving the issue.

 

All of the items that use the attributes do not have any additional prices assigned as there are no additional costs for such attributes.

 

I am currently using the OSCommerce oscommerce-2.2ms2-060817 version I don't remember what vers of the SPPC I have installed as I had a backup harddrive crash on me that had all the contributions installed on that harddrive.

 

I really need to get this issue resolved.

 

Thanks in advance for any help you may be able to give me concerning this.

Edited by airsofting
Link to comment
Share on other sites

Please provide more information.

Do you have an SPPC group called retail?

Have you followed all SPPC installation instructions?

In the admin > My Store page do you have "Display prices with tax" set to true?

This should always be set to true for SPPC.

In the admin > Customers > Customers groups > Retail page have you set "Show prices with/without tax " to "Show prices with tax"?

Have you set the correct prices for your items?

Do you have a group for which prices are displayed without tax?

If so, is the correct price being displayed for this group?

 

Hi

Basically yes to all of the above.

 

The vat is calculating correctly on the admin side but I cannot get the gross price to appear on the product listing pages or as a % the invoice.

 

CHeers

Link to comment
Share on other sites

Hi all,

 

Ok tired of racking my brain on this one. So I am coming to the pros for some help. I have searched and read this thread here for several hours and have tried a few things mentioned (one is listed below) and still cannot get this error to go away.

 

Noticed when I clicked on an item that has attributes assigned to them and added to the cart I get this error message: Fatal error: Call to undefined method currencies::calculate_price() in /home/blahblah/public_html/store/includes/classes/shopping_cart.php on line 428. Line 428 is:

 $this->total -= $currencies->calculate_price($attribute_price[$n]['options_values_price'], $products_tax, $qty);

 

One thing I did notice in my shopping_cart.php file that was not there is:

function calculate() {
global $currencies, $customer_id, $sendto, $ship_zip;

 

The function calculate was there but none of the rest. So I added the rest to the code and it is still not making any difference or resolving the issue.

 

All of the items that use the attributes do not have any additional prices assigned as there are no additional costs for such attributes.

 

I am currently using the OSCommerce oscommerce-2.2ms2-060817 version I don't remember what vers of the SPPC I have installed as I had a backup harddrive crash on me that had all the contributions installed on that harddrive.

 

I really need to get this issue resolved.

 

Thanks in advance for any help you may be able to give me concerning this.

 

 

Anyone???? Please???

Link to comment
Share on other sites

  • 2 weeks later...

Hi Again,

 

Dont know if anybody can help but when I try to add an item to my shopping cart I get the error messgage

 

Call to a member function loadProduct() on a non-object in ........shopping_cart line 485

 

This refers to the code section

 

// BOF QPBPP for SPPC

$pf->loadProduct($products_id, $languages_id); // does query if necessary and adds to

// PriceFormatterStore or gets info from it next

if ($products = $pfs->getPriceFormatterData($products_id)) {

if (tep_not_null($this->contents[$products_id]['discount_categories_id'])) {

$nof_items_in_cart_same_cat = $discount_category_quantity[$this->contents[$products_id]['discount_categories_id']];

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

} else {

$nof_other_items_in_cart_same_cat = 0;

}

$products_price = $pf->computePrice($this->contents[$products_id]['qty'], $nof_other_items_in_cart_same_cat);

// EOF QPBPP for SPPC

 

It was a fresh install with SPPC , Price Breaks for SPPC and STS 4.5.9 added only so far.

Link to comment
Share on other sites

It was a fresh install with SPPC , Price Breaks for SPPC and STS 4.5.9 added only so far.

Are you sure the following was added to includes/application_top.php (first three lines already there):

 

// include currencies class and create an instance
 require(DIR_WS_CLASSES . 'currencies.php');
 $currencies = new currencies();
// BOF QPBPP for SPPC
 // include the price formatter classes for the price breaks contribution
 require(DIR_WS_CLASSES . 'PriceFormatter.php');
 $pf = new PriceFormatter;
 require(DIR_WS_CLASSES . 'PriceFormatterStore.php');
 $pfs = new PriceFormatterStore;
// EOF QPBPP for SPPC

Link to comment
Share on other sites

Its lovely outside, and I'm on the computer copying and pasting code!

 

Anyways, to the issue at hand. I have installed STS as well as EP. I am stuck on one step in the SPPC install. The code doesn't appear in my file and I can't find a way to amend it. I've searched all over the forum and outside with no luck. Below is the step from the installation for product_info.php

Replace:

      $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name");

 

With:

      $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' and find_in_set('".$customer_group_id."', attributes_hide_from_groups) = 0 order by popt.products_options_name");

 

In my product_info.php around the area the replace code should be is this:

 

<?php
 } else {
   $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
   $product_info = tep_db_fetch_array($product_info_query);

   tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'");

   if ($new_price = tep_get_products_special_price($product_info['products_id'])) {// BOF Separate Pricing per Customer
     if ($customer_group_id > 0) { // only need to check products_groups if customer is not retail
       $scustomer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id']. "' and customers_group_id =  '" . $customer_group_id . "'");
       if ($scustomer_group_price = tep_db_fetch_array($scustomer_group_price_query)) {
         $product_info['products_price']= $scustomer_group_price['customers_group_price'];
      }
     } // end if ($customer_group_id > 0)
// EOF Separate Pricing per Customer

     $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';
   } else {
// BOF Separate Pricing per Customer
     if ($customer_group_id > 0) { // only need to check products_groups if customer is not retail
       $scustomer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id']. "' and customers_group_id =  '" . $customer_group_id . "'");
       if ($scustomer_group_price = tep_db_fetch_array($scustomer_group_price_query)) {
       $product_info['products_price']= $scustomer_group_price['customers_group_price'];
    }
   } // end if ($customer_group_id > 0)
// EOF Separate Pricing per Customer
$products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));
   }

   if (tep_not_null($product_info['products_model'])) {
     $products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>';
   } else {
     $products_name = $product_info['products_name'];
   }
?>
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
           <td class="pageHeading" valign="top"><?php echo $products_name; ?></td>
           <td class="pageHeading" align="right" valign="top"><?php echo $products_price; ?></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td class="main">
<?php
   if (tep_not_null($product_info['products_image'])) {

 

There is no metion of "$products_options_name_query" anywhere in the file and I can't quite figure out with contribution did what to it. Any help would be greatly appreciated.

 

Thanks,

Dan

Link to comment
Share on other sites

There is no metion of "$products_options_name_query" anywhere in the file and I can't quite figure out with contribution did what to it.

In a regular osC product_info.php file your last line is followed by the Javascript for a popup window then the echo'ing of the products description and then the code for the attributes:

 

         <p><?php echo stripslashes($product_info['products_description']); ?></p>
<?php
   $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");
   $products_attributes = tep_db_fetch_array($products_attributes_query);
   if ($products_attributes['total'] > 0) {
?>
         <table border="0" cellspacing="0" cellpadding="2">
           <tr>
             <td class="main" colspan="2"><?php echo TEXT_PRODUCT_OPTIONS; ?></td>
           </tr>
<?php
     $products_options_name_query = tep_db_query("select distinct popt.products_options_id, etcetera, etcetera

Link to comment
Share on other sites

Are you sure the following was added to includes/application_top.php (first three lines already there):

 

// include currencies class and create an instance
 require(DIR_WS_CLASSES . 'currencies.php');
 $currencies = new currencies();
// BOF QPBPP for SPPC
 // include the price formatter classes for the price breaks contribution
 require(DIR_WS_CLASSES . 'PriceFormatter.php');
 $pf = new PriceFormatter;
 require(DIR_WS_CLASSES . 'PriceFormatterStore.php');
 $pfs = new PriceFormatterStore;
// EOF QPBPP for SPPC

 

 

Hi again,

 

Thanks for the reply. Yes I have checked and the lines have been added. I did have to change the navigation in the application to to;

 

// navigation history

// navigation history

if (tep_session_is_registered('navigation')) {

if (PHP_VERSION < 4) {

$broken_navigation = $navigation;

$navigation = new navigationHistory;

$navigation->unserialize($broken_navigation);

} else {

$navigation = new navigationHistory;

}

} else {

tep_session_register('navigation');

$navigation = new navigationHistory;

}

 

$navigation->add_current_page();

 

Would this make a difference? Otherwise, if I go to product info and listing I can see the normal changes that I would expect to see for price break (ie, from on product listing and the price break table on product info.

 

Hope you can help

Link to comment
Share on other sites

Would this make a difference?

I wouldn't think so. The simplest way to fix the navigation error is the "official" one by the way:

 

// navigation history
 if (tep_session_is_registered('navigation')) {

Change to:

 

// navigation history
 if (tep_session_is_registered('navigation') && is_object($navigation)) {

Regarding the problem you have. Why don't you change the code in application_top.php to (use require_once instead of require):

// BOF QPBPP for SPPC
 // include the price formatter classes for the price breaks contribution
 require_once(DIR_WS_CLASSES . 'PriceFormatter.php');
 $pf = new PriceFormatter;
 require_once(DIR_WS_CLASSES . 'PriceFormatterStore.php');
 $pfs = new PriceFormatterStore;

And then on the page that gives the error add before the call to $pf:

 

 If (!is_object($pf)) {
   $pf = new PriceFormatter;
 }
 If (!is_object($pfs)) {
   $pfs = new PriceFormatterStore;
 }

 

Or perhaps declaring $pf and $pfs a global in the shopping_cart file you have a problem with is the simplest solution?

Link to comment
Share on other sites

So I'm guessing that by loading one of the contributions, its removed it and replaced the code. I guess I'll go back though the other contribs to find who did what where sort of thing. So frustrating! :D

 

Thanks for the reply Jan.

 

Dan

Link to comment
Share on other sites

I found the culprit: Simple Multi Images Addon. Going to get rid of that to make SPPC work. Yay! Another warm gorgeous day I could be fishing, and I'm at a computer! :D Has anyone managed to get SMIA to work with SPPC out of interest?

 

Dan

Link to comment
Share on other sites

I wouldn't think so. The simplest way to fix the navigation error is the "official" one by the way:

 

// navigation history
 if (tep_session_is_registered('navigation')) {

Change to:

 

// navigation history
 if (tep_session_is_registered('navigation') && is_object($navigation)) {

Regarding the problem you have. Why don't you change the code in application_top.php to (use require_once instead of require):

// BOF QPBPP for SPPC
 // include the price formatter classes for the price breaks contribution
 require_once(DIR_WS_CLASSES . 'PriceFormatter.php');
 $pf = new PriceFormatter;
 require_once(DIR_WS_CLASSES . 'PriceFormatterStore.php');
 $pfs = new PriceFormatterStore;

And then on the page that gives the error add before the call to $pf:

 

 If (!is_object($pf)) {
   $pf = new PriceFormatter;
 }
 If (!is_object($pfs)) {
   $pfs = new PriceFormatterStore;
 }

 

Or perhaps declaring $pf and $pfs a global in the shopping_cart file you have a problem with is the simplest solution?

 

 

hi Again,

 

Thanks for that, I added it twice as it calls the pf twice, and it works, but I now dont seem to be able to add more than 1 product to the cart. Could this be becuase of this or is it something completly different. I have checked and my cart says that the number of items is increasing, but the price stays the same and only shows 1 product no matter how many I add

 

Thanks Again

Edited by davidkinsella
Link to comment
Share on other sites

  • 2 weeks later...

Hi guys,

 

I have shop with many discounting tools and for some reason my sub total in not displayed properly.

I have added:

Shipping insurance

Quantity Price Breaks

Get 1 free

 

One I'm adding something to basket prices are all wrong but when I'm going thru checkout process it is calculated properly with one small difference

shipping insurance sometimes is missing (it isn't random: when product with insurance is added as last one insurance is added to total if is as a second isn't)

when a look into cart with items price is calculated wrong but it isn't random too, for example

in cart i have 10x product 1 price = 200 (10x20)

when i will add 1x product 2 price will change to 120 (10x12)

for some reason sub-total taking always firs item qty

it must be something wrong with: /includes/classes/shopping_cart.php

or PriceFormatter.php can't work with Get 1 free.

But in payment process prices are calculated properly - but not the shipping insurance :/

 

Can anyone Help?

Thanks

Edited by Schaboo
Link to comment
Share on other sites

I have removed Get 1 free and it is having an issue with price and insurance which means that price formater is doing something wrong.

 

Possibly you will need to add some code of the insurance contribution to PriceFormatter (and/or PriceFormatterStore) to make it display correct prices?

Link to comment
Share on other sites

Hi Jan,

 

I readed posts #5530 and #5531 of this thread and I need support to Display MSRP & Savings (http://addons.oscommerce.com/info/3574) on product_info.php

 

My code with SPPC:

 if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
// BOF Separate Pricing per Customer
     if ($customer_group_id > 0) { // only need to check products_groups if customer is not retail
       $scustomer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id']. "' and customers_group_id =  '" . $customer_group_id . "'");
       if ($scustomer_group_price = tep_db_fetch_array($scustomer_group_price_query)) {
         $product_info['products_price']= $scustomer_group_price['customers_group_price'];
      }
     } // end if ($customer_group_id > 0)
// EOF Separate Pricing per Customer
     $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';
     $products_price_ex = ' ' . $currencies->display_price_ex($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . ' ';		
   } else {
// BOF Separate Pricing per Customer
     if ($customer_group_id > 0) { // only need to check products_groups if customer is not retail
       $scustomer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id']. "' and customers_group_id =  '" . $customer_group_id . "'");
       if ($scustomer_group_price = tep_db_fetch_array($scustomer_group_price_query)) {
       $product_info['products_price']= $scustomer_group_price['customers_group_price'];
    }
   } // end if ($customer_group_id > 0)
// EOF Separate Pricing per Customer
     $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));
     $products_price_ex = $currencies->display_price_ex($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));
   }
    $products_name = $product_info['products_name'];
    $products_qty = $product_info['products_quantity'];
?>

 

Original instructions of MSRP & Savings

7b) Find:

 

if ($new_price = tep_get_products_special_price($product_info['products_id'])) {

$products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';

} else {

$products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));

}

 

and change it to read:

 

$products_price = '<table class="" align="right" border="0" width="100%" cellspacing="0" cellpadding="0">';

$new_price = tep_get_products_special_price($product_info['products_id']);

if ($product_info['products_msrp'] > $product_info['products_price'])

 

$products_price .= '<tr class="PriceListBIG"><td align="right">' . TEXT_PRODUCTS_MSRP . $currencies->display_price($product_info['products_msrp'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</td></tr>';

if ($new_price != '')

$products_price .= '<tr class="usualpriceBIG"><td align="right">'. TEXT_PRODUCTS_USUALPRICE . '';

else

$products_price .= '<tr class="pricenowBIG"><td align="right">'. TEXT_PRODUCTS_OUR_PRICE . '';

 

$products_price .= $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</td></tr>';

 

if ($new_price != '')

{$products_price .= '<tr class="pricenowBIG"><td align="right">' . TEXT_PRODUCTS_PRICENOW . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</td></tr>';}

if ($product_info['products_msrp'] > $product_info['products_price'])

{if ($new_price != '')

{$products_price .= '<tr class="savingBIG"><td align="right" >' . TEXT_PRODUCTS_SAVINGS_RRP . $currencies->display_price(($product_info['products_msrp'] - $new_price), tep_get_tax_rate($product_info['products_tax_class_id'])) . ' ('. number_format(100 - (($new_price / $product_info['products_msrp']) * 100)) . '%)</td></tr>';}

else

{$products_price .= '<tr class="savingBIG"><td ="right" >' . TEXT_PRODUCTS_SAVINGS_RRP . $currencies->display_price(($product_info['products_msrp'] - $product_info['products_price']), tep_get_tax_rate($product_info['products_tax_class_id'])) . ' ('. number_format(100 - (($product_info['products_price'] / $product_info['products_msrp']) * 100)) . '%)</td></tr>';}}

else

{if ($new_price != '')

{$products_price .= '<tr class="savingBIG"><td align="right" >' . TEXT_PRODUCTS_SAVINGS_RRP . $currencies->display_price(($product_info['products_price'] - $new_price), tep_get_tax_rate($product_info['products_tax_class_id'])) . ' ('. number_format(100 - (($new_price / $product_info['products_price']) * 100)) . '%)</td></tr>';}}

$products_price .= '</table>';

 

I tried changing code in diferent ways but all were a disaster.

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