Hey guys, i have a template that uses
<span id="cart-total"><?php echo $text_items; ?></span>
This is standard opencart, i guess
But this situation shows both product counter + price as you can see it here
How can i change only to product counter?
I changed the language file to %s instead of %s - %s but only has effect when i update the page
Thanks in advance, i really appreciate the help.
No OC version posted. Assuming v2.3.0.2, in catalog/controller/checkout/cart.php file,
find:
replace with:
Then, in your catalog/language/<your_language_code>/checkout/cart.php file,
find:
replace with:
This should resolve the issue.
find:
Code: Select all
$json['total'] = sprintf($this->language->get('text_items'), $this->cart->countProducts() + (isset($this->session->data['vouchers']) ? count($this->session->data['vouchers']) : 0), $this->currency->format($total, $this->session->data['currency']));
Code: Select all
$json['total'] = sprintf($this->language->get('text_items'), $this->cart->countProducts());
find:
Code: Select all
$_['text_items'] = '%s item(s) - %s';
Code: Select all
$_['text_items'] = '%s item(s)';
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Yes, its v2.3.0.2, sorry i forgot to mention.straightlight wrote: ↑Sun Jan 14, 2018 12:07 amNo OC version posted. Assuming v2.3.0.2, in catalog/controller/checkout/cart.php file,
find:
replace with:Code: Select all
$json['total'] = sprintf($this->language->get('text_items'), $this->cart->countProducts() + (isset($this->session->data['vouchers']) ? count($this->session->data['vouchers']) : 0), $this->currency->format($total, $this->session->data['currency']));
Then, in your catalog/language/<your_language_code>/checkout/cart.php file,Code: Select all
$json['total'] = sprintf($this->language->get('text_items'), $this->cart->countProducts());
find:
replace with:Code: Select all
$_['text_items'] = '%s item(s) - %s';
This should resolve the issue.Code: Select all
$_['text_items'] = '%s item(s)';
This solved the issue, thanks!
No problem. Your description and the images posted with the issue definitely does respect the forum rules, however.
Just don't forget to post the OC version when creating a new topic.
Just don't forget to post the OC version when creating a new topic.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Who is online
Users browsing this forum: No registered users and 41 guests