Price FILTER

  • Posts: 16
  • Thank you received: 2
11 years 7 months ago #95671

Good time to all!
In fact, as to make a selection of goods at prices ranging from 100 to 200. Even within the same category. In the filters, I can put the type of "range." They looks like a slider. Start parameters are set manually in the settings (in BackEnd). But I need to change the 2 values ​​minimum and maximum on FrontEnd in the two text fields. This, apparently, standard thing. But I can not do this!
I will appreciate any idea. Thanks for reply and sorry for my english

Last edit: 11 years 7 months ago by tsa672.

Please Log in or Create an account to join the conversation.

  • Posts: 26152
  • Thank you received: 4027
  • MODERATOR
11 years 7 months ago #95751

Hi,

You can create several types of filters : Text, Radio, Checkbox, Single Dropdown, Multiple Dropdown, Cursor, List.
The price range is not compatible with the "text" mode. But you can use the "multiple dropdown" in order to select the min, and the max.

After that, I guess that, with some modifications you could change the dropdowns by text inputs. But it would require some PHP and Javascript skills.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 16
  • Thank you received: 2
11 years 7 months ago #95770

Thanks for the reply. I am willing to make changes to the PHP Script, (I think it is a file administrator \ components \ com_hikashop \ classes \ filtr.php), but when I upgrade HIKA - file can be changed(?). And how to make a filter for the price in the drop down list? Such ranges:
from 0 to 100;
from 100 to 500;
from 500 to 1000;

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 7 months ago #95815

When updating, you will loose the changes. So you can add modifications, but you will have to put them back at each update.
The best way is to do that in a plugin.
www.hikashop.com/fr/support/documentatio...r-documentation.html

To have this kind of range, you just have to add the values "100" "500" "1000" when creating the filter.

Please Log in or Create an account to join the conversation.

  • Posts: 16
  • Thank you received: 2
11 years 7 months ago #95988

Thanks for the reply. As I understand it, with the standard tools it is impossible. And will have to rewrite the code HIKA.

Please Log in or Create an account to join the conversation.

  • Posts: 82785
  • Thank you received: 13353
  • MODERATOR
11 years 7 months ago #96123

Yes, but instead of changing the code directly in administrator \ components \ com_hikashop \ classes \ filter.php you should instead get the code of that file in a joomla system plugin and change the code there and your system plugin will override the classes in HikaShop's filter.php file.
That way, when you update HikaShop, you won't loose your changes.

Note that at the beginning of the plugin code, you will have to load the helpers/helper.php file of the backend of HikaShop because the main filter class extends from the hikashopClass class.
You can do that with such line:
if(!include_once(rtrim(JPATH_ADMINISTRATOR,DS).DS.'components'.DS.'com_hikashop'.DS.'helpers'.DS.'helper.php')) return true;

Please Log in or Create an account to join the conversation.

  • Posts: 16
  • Thank you received: 2
11 years 7 months ago #96572

Thank you! I try, where possible, not to make changes to the code HIKA. This is a great product and I hope that his work will be stable. I have already solved the problem a little differently. Be sure to get your advice.
If it is not difficult to answer one more question:
How knowing the ID category, get the ID of the menu item to which the "tied" in the category module HIKA? This information, as I understand it, is in the hikashop_config. Thank you.

Last edit: 11 years 7 months ago by tsa672.

Please Log in or Create an account to join the conversation.

  • Posts: 82785
  • Thank you received: 13353
  • MODERATOR
11 years 7 months ago #96920

For a menu, you can do like that :

$menuClass = hikashop_get('class.menus');
$menuData = $menuClass->get($menu_id);
echo $menuData->hikashop_params['selectparentlisting'];
For a module, you can do like that :
$moduleClass = hikashop_get('class.modules');
$moduleData = $menuClass->get($module_id);
echo $moduleData->hikashop_params['selectparentlisting'];

The following user(s) said Thank You: tsa672

Please Log in or Create an account to join the conversation.

  • Posts: 16
  • Thank you received: 2
11 years 7 months ago #96970

Thank you so much! I am, so to speak, already in love with HIKASHOP. Surprising flexibility and features! Recommend this product to all developers of online shops!.

Please Log in or Create an account to join the conversation.

Time to create page: 0.076 seconds
Powered by Kunena Forum