Post by alikhan99 » Sat Jan 20, 2018 10:52 pm

Friends i recently found a bug in OC 3.0.3 (fresh install) that weather its a category page or search result page etc. if there is no product then {{ text_empty }} is fetching date from language/checkout/cart or language file instead of language/product/ category or search etc. hence the render text is Your shopping cart is empty! instead of There is no product that matches the search criteria. OR There are no products to list in this category.
I do not understand the reason for this even when the language/checkout/cart is not even called in these pages controllers.
A temporary solution that i could think of was to add the following line of code in controller/product/category file

Code: Select all

$data['text_empty'] = $this->language->get('text_empty');
but this does not seems to be the right way to solve this.
Hope you friends can help me find a better way to solve this bug.
Thank you

Active Member

Posts

Joined
Fri Jun 29, 2012 4:57 pm

Post by george.ele90 » Mon Jan 29, 2018 3:49 am

i can confirm this bug in 3.0.2.

Newbie

Posts

Joined
Mon Jan 29, 2018 3:46 am

Post by mauprik » Mon Jul 09, 2018 4:51 am

I stumbled on the same issue in V 3.0.2.0.
There is no data in the system for orders, only categories and products I've imported and 1 account to login for testing my adjustments for my site.

When I go to "My Account" --> "Wish list (%)". I get the message "Your shopping cart is empty!"
The same for "My Account" --> "Modify your address book entries". I get the message "Your shopping cart is empty!"
The same for "My Account" --> "Order history". I get the message "Your shopping cart is empty!"
The same for "My Account" --> "Returns". I get the message "Your shopping cart is empty!"
The same for "My Account" --> "Transactions". I get the message "Your shopping cart is empty!"
This all happens in the English version of my site. In the dutch version it goes the same, but then with the message: "U heeft nog geen producten in uw winkelwagen.".

So I can conclude that it isn't a language issue, but the wrong file issue.
All the return messages come from the "text_empty" variable in the file: catalog/language/en-gb/checkout/cart.php, and for dutch nl-nl instead of en-gb.

For i.e. wishlist the massage from variable "text_empty" should come from the file: catalog/language/en-gb/account/wishlist.php.

For the screen "My Account" --> "wishlist" the variable "test_empty" is called from the file: catalog/view/theme/default/template/account/wishlist.twig, line 58:
<p>{{ text_empty }}</p>

The problem, I think, is that there is no specification in the code for the file from which the variable "text_empty" has to come from (like a class?). So each time the variable is called upon, it comes, for one or other reason, from the file cart.php, in stead of from the aimed file i.e. wishlist.php.

I am not a php programmer, so I don't know the syntax to adjust the code in the proper manner to solve this issue (maybe bug?). Can anyone here help me to solve this issue, so I can scrape this issue from my list?

Thanks in advance...
Last edited by mauprik on Tue Jul 10, 2018 5:25 am, edited 1 time in total.

New member

Posts

Joined
Sun Dec 03, 2017 10:54 pm
Location - The Hague, Netherlands

Post by straightlight » Tue Jul 10, 2018 4:03 am


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 mauprik » Tue Jul 10, 2018 5:23 am

Done all that must be done and it's solved. Thank you for the answer. Now I can look for the fix of the next issue: "My account" --> "wishlist (%)", how to get rid of the (%).
(update: And this is now also solved...)

New member

Posts

Joined
Sun Dec 03, 2017 10:54 pm
Location - The Hague, Netherlands

Post by straightlight » Tue Jul 10, 2018 6:31 am


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
Who is online

Users browsing this forum: No registered users and 78 guests