This occurs after you add something to the cart
After some investigations in OC files this is related to the total.php files in: .... /catalog/language/english/extensions/total.php
when disable the heading_title in the following files : coupon.php ,shipping.php ,voucher.php the header on the cart is correct, but then the functionality of this extension is missing.
Could there be any bug in the core of OC causing this problem?
Any suggestion to correct this will be appreciated
This can be viewed on the website www.uniformsbutikken.net
Raptorheli
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
I can´t manage solve this problem that the heading of the Shopping cart change to Gift certificate when you add some product to the cart.
This have something to do with the extension/total and the three files : coupon, Voucher, shipping, heading variable
Is there Anyone who know something to do and advice ?
Raptorheli
Code: Select all
IN:
/catalog/controller/checkout/cart.php
AFTER:
if ($this->cart->hasProducts() || !empty($this->session->data['vouchers'])) {
ADD:
$data['heading_title'] = $this->language->get('heading_title');
Raptorheli
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Make sure you clear all your caches. This includes (1) the ocMod cache, (2) the Twig cache, and (3) any caching extensions you have installed on your store.raptorheli wrote: ↑Fri Oct 27, 2017 7:36 pmI have added the line , but nothing have changed, please look at the page https://www.uniformsbutikken.net/
Raptorheli
Many thanks.
My site: www.darkroom.vn/opencart/
OC 3.0.2.0
Code: Select all
$data['breadcrumbs'][] = array(
'href' => $this->url->link('checkout/cart'),
'text' => $this->language->get('heading_title')
);
if ($this->cart->hasProducts() || !empty($this->session->data['vouchers'])) {
$data['heading_title'] = $this->language->get('heading_title');
if (!$this->cart->hasStock() && (!$this->config->get('config_stock_checkout') || $this->config->get('config_stock_warning'))) {
$data['error_warning'] = $this->language->get('error_stock');
} elseif (isset($this->session->data['error'])) {
$data['error_warning'] = $this->session->data['error'];
unset($this->session->data['error']);
} else {
$data['error_warning'] = '';
}
Code: Select all
if ($this->cart->hasProducts() || !empty($this->session->data['vouchers'])) {
Code: Select all
if (!empty($this->session->data['user_token'])) {
echo 'test123';
}
Then, login to your Opencart admin and go to your store from the header menu. Go back to your reported page where the heading_title has the issue and see on top of the page if you see: test123 .
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Thank you for your respond. I will describe what I did:
1/ I added the code as you said. So now, my code is like this
Code: Select all
if ($this->cart->hasProducts() || !empty($this->session->data['vouchers'])) {
if (!empty($this->session->data['user_token'])) {
echo 'test123';
}
$data['heading_title'] = $this->language->get('heading_title');
if (!$this->cart->hasStock() && (!$this->config->get('config_stock_checkout') || $this->config->get('config_stock_warning'))) {
$data['error_warning'] = $this->language->get('error_stock');
} elseif (isset($this->session->data['error'])) {
$data['error_warning'] = $this->session->data['error'];
3/ I access my store through the the top right menu on the admin page.
4/ I added 1 item to the cart and I viewd my cart
5/ I don't see any "test123" so I Ctrl-F to find "test123" but there's no "test123". And the heading is still incorrect.
Am I experiencing the cache issue? If so. What can I do? I cleared the cache via the Admin Dashboard, cleared the Journal Theme cache also. I didn't edit any twig in Theme editor and I also delete all the cache file in the storage folder.
straightlight wrote: ↑Fri Dec 22, 2017 9:50 pmIt may look like a cache issue you're experiencing. Let's troubleshoot this issue. Below this line:
add:Code: Select all
if ($this->cart->hasProducts() || !empty($this->session->data['vouchers'])) {
Save changes.Code: Select all
if (!empty($this->session->data['user_token'])) { echo 'test123'; }
Then, login to your Opencart admin and go to your store from the header menu. Go back to your reported page where the heading_title has the issue and see on top of the page if you see: test123 .
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Thank you so much. Finally it works but still I don't know how. I did use Journal 2 theme. My storage folder is outside the public_html (I checked the config.php a lot of times). Maybe the refresh button in the extensions - > modifications made it work.
By the way, I have last question: my .htaccess is not exist, I only have the .htaccess.txt. Should I rename it to .htaccess ??
Thank you so much for your help!
straightlight wrote: ↑Sat Dec 23, 2017 10:26 pmYou are either using Journal2 and / or your storage folder is still inside your system folder while it should rather be located outside your public_html folder. The config.php and admin/config.php files storage path also needs to be adjusted accordingly including .htaccess file (if found in your .htaccess file as well). Then, clear out your cache in your Opencart admin dashboard as well as from your admin - > extensions - > modifications - > refresh button. Then, logout from your OC admin. Clear out your browser's cache - > close the browser - > re-open the browser. Relog back in your Opencart admin - > click back on your store from the header and see if you notice the test123 message on top of the page.
Especially if you use SEO links or having your own SSL protocol throughout the store, it would be suggested to use it but only from a followed documentation of a downloaded SEO extensions from the marketplace or, regarding SSL, by consulting the forum search or by contacting your host about it.By the way, I have last question: my .htaccess is not exist, I only have the .htaccess.txt. Should I rename it to .htaccess ??
Otherwise, if everything is working, there's no need to modify anything else at the present time throughout your domain.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Worked for me, awesome.Johnathan wrote: ↑Thu Oct 26, 2017 9:48 pmThis is a 3.0 bug that you can fix by doing this:
Code: Select all
IN: /catalog/controller/checkout/cart.php AFTER: if ($this->cart->hasProducts() || !empty($this->session->data['vouchers'])) { ADD: $data['heading_title'] = $this->language->get('heading_title');
Just remember to turn caching off when you are editing your site, folks.
(Go to main dashboard > Cog at top right)
This worked for me as well, thanks!Johnathan wrote: ↑Thu Oct 26, 2017 9:48 pmThis is a 3.0 bug that you can fix by doing this:
Code: Select all
IN: /catalog/controller/checkout/cart.php AFTER: if ($this->cart->hasProducts() || !empty($this->session->data['vouchers'])) { ADD: $data['heading_title'] = $this->language->get('heading_title');
Johnathan wrote: ↑Thu Oct 26, 2017 9:48 pmThis is a 3.0 bug that you can fix by doing this:
Code: Select all
IN: /catalog/controller/checkout/cart.php AFTER: if ($this->cart->hasProducts() || !empty($this->session->data['vouchers'])) { ADD: $data['heading_title'] = $this->language->get('heading_title');
Work for me be sure after this clear all cache !
Thanks a lot
Same here, just stumbled upon this bug, fixed it with a modification, using solution from this thread by Johnathan.
It was reported on GitHub couple of times, but issues closed without fixes applied.
I read here https://github.com/opencart/opencart/issues/5922 – that it is fixed in OC 3.0.2.1b
Users browsing this forum: No registered users and 68 guests