Post by raptorheli » Thu Oct 19, 2017 8:49 pm

After a clean installation of OC 3020 the header of the cart page have changed to Use Gift Certificate instead of the Shopping cart
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
Last edited by raptorheli on Wed Oct 25, 2017 7:10 am, edited 1 time in total.

New member

Posts

Joined
Tue Mar 05, 2013 1:35 pm

Post by straightlight » Thu Oct 19, 2017 9:18 pm

This issue has now been addressed.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by raptorheli » Thu Oct 26, 2017 5:19 am

HI,
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

New member

Posts

Joined
Tue Mar 05, 2013 1:35 pm

Post by Johnathan » Thu Oct 26, 2017 9:48 pm

This 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');

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by raptorheli » Fri Oct 27, 2017 7:36 pm

I have added the line , but nothing have changed, please look at the page https://www.uniformsbutikken.net/

Raptorheli

New member

Posts

Joined
Tue Mar 05, 2013 1:35 pm

Post by straightlight » Fri Oct 27, 2017 7:49 pm

We can't analyze a maintenance store. Can you provide the error logs that you see based on this event?

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Johnathan » Fri Oct 27, 2017 10:23 pm

raptorheli wrote:
Fri Oct 27, 2017 7:36 pm
I have added the line , but nothing have changed, please look at the page https://www.uniformsbutikken.net/

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

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by midsouthtrading » Fri Dec 22, 2017 11:22 am

I have the same bug, fix did not fix...is there some other button to push to clear all the caches, or was clicking the "clear cache" button in Journal sufficient? Use Gift Certificate (25.12kg) is the heading now...changes weight when you change items in cart


Posts

Joined
Wed Dec 20, 2017 12:36 am

Post by callspirit » Fri Dec 22, 2017 1:49 pm

This is my code edited as Johnathan said but it not work. I post my code below, can you help me take a look at this to fix this bug.

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'] = '';
			}

Newbie

Posts

Joined
Mon Dec 11, 2017 10:14 am

Post by straightlight » Fri Dec 22, 2017 9:50 pm

It may look like a cache issue you're experiencing. Let's troubleshoot this issue. Below this line:

Code: Select all

if ($this->cart->hasProducts() || !empty($this->session->data['vouchers'])) {
add:

Code: Select all

if (!empty($this->session->data['user_token'])) {
   echo 'test123';
}
Save changes.

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


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by callspirit » Sat Dec 23, 2017 12:38 pm

Hi straightlight,

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'];

2/ I login to admin page via mysite/admin

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 pm
It may look like a cache issue you're experiencing. Let's troubleshoot this issue. Below this line:

Code: Select all

if ($this->cart->hasProducts() || !empty($this->session->data['vouchers'])) {
add:

Code: Select all

if (!empty($this->session->data['user_token'])) {
   echo 'test123';
}
Save changes.

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 .

Newbie

Posts

Joined
Mon Dec 11, 2017 10:14 am

Post by straightlight » Sat Dec 23, 2017 10:26 pm

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

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by callspirit » Sun Dec 24, 2017 1:15 am

Hi straightlight,

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

Newbie

Posts

Joined
Mon Dec 11, 2017 10:14 am

Post by straightlight » Sun Dec 24, 2017 1:25 am

By the way, I have last question: my .htaccess is not exist, I only have the .htaccess.txt. Should I rename it to .htaccess ??
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.

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


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Sokonomi » Mon Dec 25, 2017 8:29 pm

Johnathan wrote:
Thu Oct 26, 2017 9:48 pm
This 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');
Worked for me, awesome.

Just remember to turn caching off when you are editing your site, folks.
(Go to main dashboard > Cog at top right)

Active Member

Posts

Joined
Sun Sep 30, 2012 4:52 am

Post by HugoSega » Fri Jan 05, 2018 7:56 am

ALSO IN:
/catalog/controller/checkout/checkout.php

replace Line 28 with
$data['heading_title'] = $this->language->get('heading_title');

Newbie

Posts

Joined
Tue Sep 27, 2016 1:00 pm

Post by mikegilmore81 » Thu Feb 01, 2018 9:26 am

Johnathan wrote:
Thu Oct 26, 2017 9:48 pm
This 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');
This worked for me as well, thanks!

Newbie

Posts

Joined
Thu Jan 25, 2018 7:38 am


Post by alcatrazy » Sat Feb 17, 2018 6:20 pm

Johnathan wrote:
Thu Oct 26, 2017 9:48 pm
This 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

viagra feminin forum effet www.viagrasansordonnancefr.com


Newbie

Posts

Joined
Mon Feb 12, 2018 9:10 pm

Post by RaceVTA » Tue May 01, 2018 5:49 am

Just installed open cart and this bug is still there ... easy enough to fix so why isn't it updated in the current download??
What other bugs need fixing in the current opencart download??

New member

Posts

Joined
Fri Apr 27, 2018 11:42 pm

Post by emir.more » Fri May 25, 2018 6:24 am

RaceVTA wrote:
Tue May 01, 2018 5:49 am
Just installed open cart and this bug is still there ... easy enough to fix so why isn't it updated in the current download??
What other bugs need fixing in the current opencart download??
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

User avatar
Newbie

Posts

Joined
Fri May 11, 2018 5:02 am
Who is online

Users browsing this forum: No registered users and 68 guests