Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Order Total Punctuation


imusorka

Recommended Posts

How can I delete the brackets and the plus from the order total block (see attachment)?

 

I have traced the plus to the following line in /includes/functions/general.php but removing the sign shifts the Sales Tax words.

$tax_description .= $tax['tax_description'] . ' + ';
}
$tax_description = substr($tax_description, 0, -3);

Cannot find the brackets anywhere.

post-86268-0-79886300-1481059203_thumb.png

Link to comment
Share on other sites

@

 

How can I delete the brackets and the plus from the order total block (see attachment)?

 

I have traced the plus to the following line in /includes/functions/general.php but removing the sign shifts the Sales Tax words.

$tax_description .= $tax['tax_description'] . ' + ';
}
$tax_description = substr($tax_description, 0, -3);

Cannot find the brackets anywhere.

 

What shipping, order total, or shopping cart mod's are you using? Look in their public_html/includes/languages/english/ files. Yours MIGHT have () around or + in front of the words. Just remove them if they do.

 

I personally would leave your above statement alone. I would also look in public_html/includes/languages/english/checkout_process.php file. as well.

 

Take care

Bill




			
		
Link to comment
Share on other sites

It's in the shipping class:

includes/classes/shipping.php:

                                 'title' => $quotes['module'] . ' (' . $quotes['methods'][$i]['title'] . ')',
Link to comment
Share on other sites

Please post the changes you made. Also make sure you create a new order, changes will not be reflected in existing orders.

Link to comment
Share on other sites

@

 

I'm not a pro coder like Rainer, my way of thinking is more simplistic than his. It seems to that the word "Airmail" that shows in the image you posted is not standard language for osC. Somehow that word was created and if you notice the () are not around like (Airmail:) it's like Airmail():. That would lead me to believe it's in a language file and not a regular PHP code file. I could be wrong but if it were me, I would look in the language files first. Try looking in the file public_html/includes/languages/english/modules/shipping/ the_file_you_use_for_shipping.php. Somehow that word has to have the ability to be changed if needed, and that's usually done in the language files.

 

Even though you didn't install an order total mod there are still language file for the order total that are stock with osC. Your image relates to the order total.

 

The words "Sales Tax" can be setup in the Admin - Locations / Taxes - Tax Rates - Edit button - Description: Sales Tax. It can be in language files as well. I'd look in those areas first before PHP code files.

 

I could be wrong because I'm not a pro coder but I would look in those areas.

 

Take care

Bill

Link to comment
Share on other sites

Somehow that word was created and if you notice the () are not around like (Airmail:) it's like Airmail():. That would lead me to believe it's in a language file and not a regular PHP code file.

 

@@ecommunlimited, sorry, but yes, you are wrong. The brackets are added in the shipping class in the line I posted before.

 

rgds

Rainer

Link to comment
Share on other sites

@, @@ecommunlimited,

 

OK, I also missed a second place where it needs to be modified: :-

 

checkout_shipping.php

                                'title' => (($free_shipping == true) ?  $quote[0]['methods'][0]['title'] : $quote[0]['module'] . $quote[0]['methods'][0]['title']),

Brackets already removed this time.

 

rgds

Rainer

Link to comment
Share on other sites

Although the most correct would be this like it is done in 2.4:

                                            'title' => (($free_shipping == true) ?  $quote[0]['methods'][0]['title'] : $quote[0]['module'] . (isset($quote[0]['methods'][0]['title']) && !empty($quote[0]['methods'][0]['title']) ? ' (' . $quote[0]['methods'][0]['title'] . ')' : '')),
Link to comment
Share on other sites

@,

 

How can I delete the brackets and the plus from the order total block (see attachment)?

 

I have traced the plus to the following line in /includes/functions/general.php but removing the sign shifts the Sales Tax words.

$tax_description .= $tax['tax_description'] . ' + ';
}
$tax_description = substr($tax_description, 0, -3);

Cannot find the brackets anywhere.

 

The plus should only show if more than one kind of tax applies.

In a standard setup with only one tax rate it doesn't show. However to avoid shifting try to replace the plus sign by blankspace instead to remove it.

 

@@ecommunlimited,

 

I need to learn as well. Maybe I'm a little slow. How would that cause the + sign in the image?

The plus sign is something different, he found it already.

 

Also, he never stated he was using free shipping. Maybe I'm missing something.

 

 

See here  the  third note:

https://secure.php.net/manual/en/control-structures.if.php

You can do IF with this pattern :
<?php
$var = TRUE;
echo $var==TRUE ? 'TRUE' : 'FALSE'; // get TRUE
echo $var==FALSE ? 'TRUE' : 'FALSE'; // get FALSE
?>

Then have a look on the code line and try to understand.

 

rgds

Rainer

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...