Jump to content

Premizlaus

Recommended Posts

ok

i have now in php

public static function PriceFilter()
{
$cena1 = $_POST['price1'];
$cena2 = $_POST['price2'];
return '2-strona-glowna?q=Cena-zł-'.$cena1.'-'.$cena2.'';
}

 

tpl

<form action="{WszystkieProduktyControllerCore::PriceFilter()}" id="layered_form" method="post">
											<div class="filtr-od">
												od 
												<input name="price1" value="50" class="inputek layered_price_range layered_input_range_min layered_input_range form-control grey" id="layered_price_range_min" type="text"></input>
													<span class="layered_price_range_unit"></span>
											</div>
											<div class="strzalka-filtr-cena"></div>
												<div class="filtr-do">
													do 
													<input name="price2" value="200" class="inputek layered_price_range layered_input_range_max layered_input_range form-control grey" id="layered_price_range_max" type="text"></input>
														<span class="layered_price_range_unit"></span>
												</div>
												<span class="layered_price_format" style="display:none;">
													2
												</span>
											</div>
											<div class="szukajka">
												<input class="btn btn-primary fa fa-filter" type="submit" value="Filtruj"/>
											</div>
										</form>

 

but action from form not working at firs time.

 

This is code for filter price.

image.thumb.png.ed2295c8801deb20cf6a328ba4c6d1f9.png

Edited by Premizlaus (see edit history)
Link to comment
Share on other sites

1 hour ago, Premizlaus said:

Your code is to be in init function controller yes? I can not find controller for layout-left-column.tpl. Can I add a second one?

 

There is no code for the left column. The left column is populated by modules. You should check the module code and templates.

 

8 minutes ago, Premizlaus said:

blank page 

if i use $myvar = Tools::getValue('myfield') anywhere in php

 

Just check the code and you will find probably hundreds of " Tools::getValue()" in Prestashop's PHP. If it doesn't work for you to copy such a line you are doing something wrong.

But of course it might be that in your Prestashop version it works slightly different. You didn't mention your PS version.

Edited by musicmaster (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...