first message for me here so, glad to meet you
i'm running into a funny little issue, when i click on en empty category or run a search with no result, it's always the language/common/cart.php text_empty string that is displayed instead of the product/category.php or the search.php one
in order to be sure i've replaced the original string by a personal one i can't miss
if any of you had an idea that would help solve this, i would be lifelong grateful
all the best
chris
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
thanks a lot for your answer and, you know, as soon as i clicked on submit, i slapped my head and was waiting for my post to appear to add "sorry guys, forgot to say, using the very last opencart release (3.0.2.0)"
i talked a little with the great guys behind journal2 to see if they had any insight about this but having investigated a bit they ended thinking like i was that it must be an opencart issue
the website is currently local and i use extensively url_rewriting but i could easily reproduce the problem with, for example
route=product/manufacturer/info&manufacturer_id=8 (no products for this manufacturer)
or
route=product/search&search=toto&description=true (of course, no result for toto in the search field)
same for
guitares-acoustiques/guitares-acoustiques-occasions for example with url rewriting which routes to category_id=67 that has no products (yet )
actually whichever page that has no product in it displays the cart.php text_epty string instead of the category/search/ and so on text_empty one, funny isn't it?
thanks again for your time and answer
all the best
chris
As funny as trying this already working solution here: viewtopic.php?f=202&t=187159&p=704301#p704140actually whichever page that has no product in it displays the cart.php text_epty string instead of the category/search/ and so on text_empty one, funny isn't it?
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
and now to say that those great guys i talked about above that are behind journal2 theme found out the solution, it's an opencart little issue
in case it helps anybody else, solved by adding
Code: Select all
$data['text_empty'] = $this->language->get('text_empty');
Code: Select all
$data['breadcrumbs'] = array();
have a great day and thanks again for having taken time to answer
all the best
chris
Successfully sorted this in search.php with the above fix.
I carried out this fix in 'catalog/controller/account/order.php' and successful here also.
However can't seem to fix in catalog/controller/account/address.php' - this file seems a little different and can't find the right place for the extra code. Can anyone help here please? Currently if there are no customer addresses I get the 'Your Shopping Cart is empty!' message.
Big Decision
Website Production, Ecommerce & Digital Marketing in the UK
http://www.bigdecision.co.uk
When viewing the admin pages, do you see the English text or the defined keys such as text_empty?dpanderson wrote: ↑Thu Apr 05, 2018 2:01 amSame problem for me webs_bd, in multiple locations. I see the text_empty is not getting loaded, but have not successfully figured out where to load it at, or it is getting overwritten by a later called module. 3.0.2.0 with no modifications.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Thanks everyone for the code to fix this. There were still some other pages where I needed a fix, like recurring payments and address book, which needed the code in a different location. With some trial & error, I was able to find a location to insert the code given above on everything I could find that needed fixing. I'll compile all of my changes here:
Insert this code in all locations below:
Code: Select all
$data['text_empty'] = $this->language->get('text_empty');
catalog/controller/account/download.php
catalog/controller/account/order.php (find first occurance of code only)
catalog/controller/account/reward.php
catalog/controller/account/transaction.php
catalog/controller/account/wishlist.php
catalog/controller/product/category.php
catalog/controller/product/compare.php
catalog/controller/product/manufacturer.php (find first occurance of code only)
catalog/controller/product/search.php
catalog/controller/product/special.php
BEFORE:
Code: Select all
$data['breadcrumbs'] = array();
In:
catalog/controller/account/address.php
BEFORE
Code: Select all
$data['addresses'] = array();
In:
catalog/controller/account/recurring.php
AFTER
Code: Select all
$this->document->setTitle($this->language->get('heading_title'));
In:
catalog/controller/account/return.php
AFTER 1ST OCCURANCE (index function) OF
Code: Select all
$this->document->setTitle($this->language->get('heading_title'));
In:
catalog/controller/information/contact.php
BEFORE:
Code: Select all
$data['continue'] = $this->url->link('common/home');
Don't forget to refresh the cache after making these changes.
That's all I've found,
Please mention any errors or other files that need fixing
Code: Select all
$data['header'] = $this->load->controller('common/header');
Code: Select all
$this->load->language('common/cart');
For me, I fix it by change "text_empty" to "text_empty_cart" in these files.
common/cart.twig
language/en-gb/common/cart.php
Ahh ! yes, as explained to Daniel regarding the conflicted array keys on Github.devth wrote: ↑Mon Apr 29, 2019 11:45 amThis problem is caused by this line in every page.
It will load controller/common/cart.php that will load its language file by this line.Code: Select all
$data['header'] = $this->load->controller('common/header');
So, text_empty in every page will be replaced by controller/common/cart.php.Code: Select all
$this->load->language('common/cart');
For me, I fix it by change "text_empty" to "text_empty_cart" in these files.
common/cart.twig
language/en-gb/common/cart.php
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
This:
'controller/*/after' => array(
'event/debug/after'
)
To this:
//'controller/*/after' => array(
// 'event/debug/after'
// )
Users browsing this forum: No registered users and 39 guests