Opencart shows variable instead text - variables

my store suddenly starts to show just the variables, instead the text of the variable.
i already check the controller, and it looks okay.
the footer shows like this:
text_address
text_address_cnt
and the content of theses variables is
$_['text_address'] = 'Endereço';
$_['text_address_cnt'] = 'Endereço da sua loja';
the controller looks like:
$data['text_address'] = $this->language->get('text_address');
$data['text_address_cnt'] = $this->language->get('text_address_cnt');
anyone went through this?
ps: store version 2.0.2

I made a new store and works ok... Still don't know why this has happened.

Related

How can I create the resource string without a big string?

In After Effects scripts, if you want your script to be able to be docked in the program's workspace, the only way to do it as far as I know is to use a resource string like this:
var res = "Group{orientation:'column', alignment:['fill', 'fill'], alignChildren:['fill', 'fill'],\
group1: Group{orientation:'column', alignment:['fill', ''], alignChildren:['fill', ''],\
button1: Button{text: 'Button'},\
},\
}";
myPanel.grp = myPanel.add(res);
The above code creates a script UI with one button ("button1") inside a group ("group1").
I would like to know other ways to create the same resource string. Is it possible to make it using a JSON object and then stringifying it??
I know it can be done somehow, because I have inspected the Duik Bassel script that is dockable and, for example, adds elements like this:
var button1 = myPal.add( 'button' );
but I cannot understand how to do it myself.
TL;DR: I want to make a dockable scriptUI without writing a giant string all at once, but bit by bit, like a floating script.
UI container elements have an add() method which allows you to add other UI elements to them, and you can treat them as normal objects.
var grp = myPanel.add("group");
grp.orientation = "column";
grp.alignment = ['fill', 'fill'];
grp.alignChildren = ['fill', 'fill'];
var group1 = grp.add("group");
…
var button1 = group1.add("button");
button1.text = 'Button'
More details and examples here: https://extendscript.docsforadobe.dev/user-interface-tools/types-of-controls.html#containers
Also worth checking out https://scriptui.joonas.me/ which is a visual scriptUI interface builder. You have to do some work on the code it produces to get panels for AE, but it's not hard.
extendscript still uses a 20th century version of javaScript, which doesn't have JSON built-in, but I have successfully used a JSON polyfill with it.
I used json2.js to get structured data in and out of Illustrator, and it worked beautifully, but I can see there's now a json3.js which might be better for whatever reason. This stackoverflow question addresses the differences.
To load another .js file (such as a polyfill) into your script, you need to do something like
var scriptsFolder = (new File($.fileName)).parent; // hacky but effective
$.evalFile(scriptsFolder + "/lib/json2.js"); // load JSON polyfill
These file locations may differ in other Adobe apps. Not sure what it would be in AfterEffects. I seem to remember that InDesign has a different location for scripts. You can also hardcode the path, of course.
Good luck!

TYPO3: variables not working

Using variables in T3 aren't working.
I actually just copied the snippets from a working site.
TS:
page.10 = FLUIDTEMPLATE
page.10.variables {
content < styles.content.get
content.select.where = colPos=0
info < styles.content.get
info.select.where = colPos=1
}
Inside the HTML template:
<f:format.html parseFuncTSPath="">{info}</f:format.html>
<f:format.html parseFuncTSPath="">{content}</f:format.html>
The template is being included, added a random <hr/> to make sure changes are displayed in the FE.
Dummy content is inserted in the correct columns in the BE (colPos 0 & 1).
Also tried it without the <f:format.html> and with a <f:format.raw>.
EDIT: Well, even though it's obvious, I also made sure I'm on the correct page (uid=2).
Can anyone help? Thanks.
I'm running T3 7.6.9
Well, I knew it was somewhere obvious:
I forgot to include the fluid_styled_content includes.

django-autocomplete-light doesn't show 'add-another' button

I wasted a lot of time trying to solve this problem but didn't find any solution. I wanted to use django-autocomplete-light in Admin-interface not only selecting values existing in another table but adding new values. If I use it like this:
class MeaningAdmin( admin.ModelAdmin):
form = autocomplete_light.modelform_factory( Meaning)
everything is Ok and I can see and use 'add-another'-button on the form, but when I use it like following:
class MeaningAdmin( admin.ModelAdmin):
form = MeaningForm
'add-another'-button disappears. Does anybody know how to force get this button back in the 2nd case?

Clear Store sencha

Hi i have an app that populates store using a proxy. I want to clear the store on click of a button and let the user enter in different information and repopulate if that makes sense. I am currently using :
window.location.reload();
but this gives a white screen for a couple of seconds which is not nice. I have also tried the following :
var store = Ext.getStore('Places');
store.getProxy().clear();
store.data.clear(); store.sync();
but this gives an error relating to the .getProxy()
I have also tried:
Ext.StoreMgr.get('Places').removeAll();
Ext.StoreMgr.get('Places').sync();
but when the i go to repopulate the old data remains. Is there a way to clear the stores?
The best Way to clear Store is
var store = Ext.getStore('SessionStore');
store.load();
store.getProxy().clear();
store.data.clear();
store.sync();

ExtJS/Sencha Touch 2 - How to grab an element/component with multiple classes in

I'm not sure if I'm going crazy. I've tested this on Kitchen sink also so it's not just me.
I've tried:
Ext.ComponentQuery.query('container[cls="blah"]');
Ext.ComponentQuery.query('container[cls~="blah"]');
But after it has a second class, it seems you can't get ahold of something by a class that it has.
Am I missing something or is this not possible?
If you go to http://dev.sencha.com/deploy/touch/e.../#demo/buttons
Ext.ComponentQuery.query('button')[0];
// returns element
Ext.ComponentQuery.query('button')[0].addCls('meep');
Ext.ComponentQuery.query('button[cls="meep"')[0];
// returns element
Ext.ComponentQuery.query('button')[0].addCls('blah');
Ext.ComponentQuery.query('button[cls="meep"')[0];
// returns undefined
Ext.ComponentQuery.query('button[cls~="meep"')[0];
// returns undefined
Because of what I expect and how the documentation words their DomQuery I think the above should work but is bugged.
I got around this by creating a new xtype and using that instead in ComponentQuery like so:
Ext.define('App.view.Deposit', {
extend: 'Ext.Container'
});
Ext.ComponentQuery('meep');
I guess I was trying to go about it like you would in jQuery, add a class and retrieve it using that, but with the Component stuff it's confusing.
I think this SHOULD have worked but it does not (tested in 2.0.1.1, 2.1.0b3):
Ext.ComponentQuery.query('button[cls*="meep"')[0];