Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Twig Templates (catalog): {{ text_empty }} where {{ text_no_results }} belongs #6070

Closed
rmullaney77 opened this issue Oct 9, 2017 · 12 comments

Comments

@rmullaney77
Copy link

rmullaney77 commented Oct 9, 2017

One example (but many instances) of 'text_empty' being used in the wrong place...

https://github.com/opencart/opencart/blob/master/upload/catalog/view/theme/default/template/product/category.twig

      {% if not categories and not products %}
      <p>{{ text_empty }}</p>

Should be...

      {% if not categories and not products %}
      <p>{{ text_no_results }}</p>

As far as we can tell, this is the case in every front-end twig that displays multiple results.

Note: This is the only issue preventing us from deploying 3.0.2.x stores at this time.

@rmullaney77 rmullaney77 changed the title {{ text_empty }} being used where {{ text_no_results }} belongs Twig Templates (catalog): {{ text_empty }} where {{ text_no_results }} belongs Oct 9, 2017
@straightlight
Copy link
Contributor

Confirmed. A new topic has been created with all included files that needs to be edited with those statements: https://forum.opencart.com/viewtopic.php?f=201&t=192018

@danielkerr
Copy link
Member

danielkerr commented Oct 10, 2017

fine i will sort it tomorrow.

@danielkerr
Copy link
Member

danielkerr commented Oct 11, 2017

what are u guys talking about!

if i use text_empty is says:

You have not made any previous returns!

if i use text_no_results:

No results!

which is better? obversely the first one. are u just complaining about constancy?

@danielkerr
Copy link
Member

so far only u 2 are complaining about this!

@rmullaney77
Copy link
Author

rmullaney77 commented Oct 16, 2017 via email

@danielkerr
Copy link
Member

its not valid! its not stopping anything from not working!

its your own preference to have a var with a ceritan name even though the pages where i have used no result are different from than page in the catalog.

@rmullaney77
Copy link
Author

rmullaney77 commented Oct 16, 2017 via email

@danielkerr
Copy link
Member

and banned!

no issue! morron~!

@dmgroom
Copy link

dmgroom commented Apr 9, 2018

I'm sorry, but this is an issue! Using opencart 3.0.2.0
The language file /category/language/en-gb/product/category.php file contains the following line:
$_['text_empty'] = 'There are no products to list in this category.';

This text is clearly meant to be displayed on a category page where there are no products.

However the text which gets displayed is "Your shopping cart is empty!"
opecartwording

This is not the correct text to display.

@PlusA2M
Copy link

PlusA2M commented Apr 21, 2018

Hi, same issues here, everywhere used {{ text_empty }} would become 'Your shopping cart is empty!' rather than the suitable text from the language file from that page. Until I delete $this->load->language('common/cart'); in catalog/controller/common/cart.php, the problem won't resolve.

@danielkerr
Copy link
Member

iits already been fixed in the master. uit requires an event adding.

'view/*/before' => array(
	500  => 'event/theme/override',
	998  => 'event/language',
	1000 => 'event/theme'
),

check the latest file and ask int he forums.

@PlusA2M
Copy link

PlusA2M commented Apr 22, 2018

I got this fixed! Just comment out the following at system/config/catalog.php

	'view/*/before' => array(
		1000  => 'event/debug/before'
	),
	'controller/*/after'  => array(
		'event/debug/after'
	)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants