layered navigation block - place in product sort place prestashop 1.6 - prestashop

I want to create a manufacturer (brand in my case) filter using the layered navigation block and place this next to my default sorting
in ps 1.5 i did this by inserting this code at my category.tpl
{include file="./modules/blocklayered/blocklayered.tpl"}
So now my problem is when i do this step at prestashop 1.6 i ecounter this error
Notice: Undefined index: nbr_filterBlocks in /home/vhost/dextertonstore2/cache/smarty/compile/2a/3d/27/2a3d274f79f30dbcf6a26fed74f871da2fb62e0e.file.blocklayered.tpl.php on line 44 Notice: Trying to get property of non-object in /home/vhost/dextertonstore2/cache/smarty/compile/2a/3d/27/2a3d274f79f30dbcf6a26fed74f871da2fb62e0e.file.blocklayered.tpl.php on line 44
Notice: Undefined index: nbr_filterBlocks in /home/vhost/dextertonstore2/cache/smarty/compile/2a/3d/27/2a3d274f79f30dbcf6a26fed74f871da2fb62e0e.file.blocklayered.tpl.php on line 436 Notice: Trying to get property of non-object in /home/vhost/dextertonstore2/cache/smarty/compile/2a/3d/27/2a3d274f79f30dbcf6a26fed74f871da2fb62e0e.file.blocklayered.tpl.php on line 436
i tried to clear the cache and recompile my template, i even deleted manually my cache in \cache\smarty\cache and \cache\smarty\compile but still im getting this error.

is blocklayered.tpl the same between the two installations (old and new)?
As I know, ./modules/blocklayered/blocklayered.tpl is overriten after update. So maybe some of your changes are lost, especially regarding nbr_filterBlocks variable. You should do your changes inside of your theme folder (my-theme/modules/blocklayered/blocklayered.tpl).

i found the solution here, this error occurs because there were no values that is pass on to our page.. in order to include the blocklayered.tpl to work .. what i did is i transplanted the layered nav into my left column and display it to none.. in this case .. the values are pass to our page by the blocklayered.php

Related

Vue: My initial data value is not accessible when used as a function param

I am having an issue when triggering the click handler in my button here. The error comes back as TypeError: Cannot read property 'discountProduct' of null when I click the button. I know for a fact that this.discountProduct.id has a value by inspecting it from the Vue Tools and by knowing that the button is rendering to begin with since it only conditionally shows if the id > 1.
I alternatively tried to remove this but it still throws the same error.
I also tried manually just inserting the product id as the param and that works so I am not sure what the issue is at this point.
<button v-if="this.discountProduct.id >= 1"
type="button"
v-on:click="addToCart(this.discountProduct.id, true)"
Is you button in the <template> tags?
If so, you do not need to use this delete from the click argument and v-if. However that should only throw a warning.
Can you also post the code for the method addToCart?
If you are not setting the full discountProduct object you will need to make sure setting the id is reactive. Like the example below:
this.$set(this.discountProduct, 'id', 1)
Nested Object/keys are not reactive without using $set. See https://v2.vuejs.org/v2/guide/reactivity.html for more details.
Hope this helps

How to make geb throw error when element not found instead of returning EmptyNavigator

in my page object I have simple method
def clickSomething(byName) {
$("a.name", text: contains(byName)).click()
}
and during execution it does not find required element and goes further.
it happens because, according to documentation, $() returns EmptyNavigator if element not found.
I want for test to fail with some kind of "ElementNotFoundException" or "NullPointerException" on trying to make click on null element.
I also do not want to add additional checks for returned element (because I would need to add that for every element identification).
Is there an elegant workaround for that ?
e.g. for elements declared within "content" there is performed such a check. But what is the best practice for elements found outside content block ?
The issue that you've encountered which is click() not throwing an error when called on en empty navigator has been fixed recently and will be released in the next version of Geb.
If you need to get an error when a selector results in an empty navigator then you can either:
wrap your selector in a content definition with the required template option set to true which is the default
call verifyNotEmpty() on your navigator

Sylius 1.0.0dev- base currency is thrown out when adding new currency

I added new currency EUR. The symfony debug toolbar now shows the base currency as "undefined" (in green colour as the selected value) and shows USD next to it (grey colour).
Also there is twig runtime error (currency could not be found) when rendering layout.html.twig and this is obvious as it arrives from renderSelectorAction in currency controller.
I think something is broken.
Can someone explain how to set up new currencies in Sylius 1 dev.
Thanks
Solved this by just selecting the base channel from debug toolbar. It removed the undefined currency and selected US$.

In-place editable field in web grid

I'm trying to add an in-place editable field to a web grid like this:
WebGrid new
columnNames: #('Test');
columnAspects: #(nil);
column: 1 addBlock: [:o | WebInPlaceEditableText aspect: #test for: o];
collection: self objects.
However, when pointing my browser to the page containing this element, I get:
Too late to add page headers, page is already streaming to response!
Add the following code at the beginning of the method where your code resides:
ScriptaculousLibrary ensure
This library initialization call is otherwise done automatically by WebInPlaceEditableText but because in your case it resides in a block which is executed late in page streaming phase, when a page is already composed, this error occurs. Therefore the manual library initialization is needed.

Dojo/Dijit: Can't get filtering select to work

I have a page with some JavaScript and it includes dojo.parser and has parseOnLoad set to true and whatnot.
Later in the page, I have another JavaScript tag that has:
dojo.require('dijit.form.FilteringSelect');
dojo.registry.remove('ID OF SELECT BOX');
After all that, I have a select box with dojoType="dijit.form.FilteringSelect".
Whenever I load the page, I get:
undefined Could not load class 'dijit.form.FilteringSelect'. Did you spell the name correctly and use a full path, like 'dijit.form.Button'?
Any ideas why? If I put the require statement in the first JavaScript tag, it works (but that tag is in a more global file, so I don't want it there).
dojo.registry is not correct. we have only dijit.registry.remove function. Maybe that is causing the problem.