Ordering Vendors via Menu Item

  • Posts: 158
  • Thank you received: 6
9 years 3 weeks ago #218872

-- url of the page with the problem -- : artrageus1.com/members
-- HikaShop version -- : 3.6
-- HikaMarket version -- : 1.6.6
-- Joomla version -- : 3..5
-- PHP version -- : 5.3.28
-- Browser(s) name and version -- : All
-- Error-message(debug-mod must be tuned on) -- : n/a

Hello,

I am trying to order the vendors in my hikamarket store: artrageus1.com/members

Based upon your recommendation, I added a "Custom Field" radio button with 6 options. I ordered them within the custom field:



Then I setup the menu to show these vendors according to the custom field "membertype".


If I change it from ascending to descending it doesn't modify the order. Furthermore, it is showing Artists 10% before Artists 25% which is not how it's ordered within the "value" area of the custom field type. Therefore, I'm not getting any logical result from the Ordering field.

May I request the following be considered:

1. Add the ability to create modules that only display vendors that meet the selected "values" from the custom field. This way I can stack the vendors in filtered modules that will have headers. (ie: all artists vendors in one module with the title "Artists", authors in a second module, and authors in a third module).

2. Add the ability to display the custom field under the vendors name. You can see from my configuration that I've set all views to Yes so the custom field shows, but nothing is turning up on the front-end. I also have it set within the global configuration to show.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 3 weeks ago #218882

Hi,

In the file "components/com_hikamarket/views/vendormarket/view.html.php" please replace

$pageInfo->filter->order->dir = $app->getUserStateFromRequest($this->paramBase . '.filter_order_Dir', 'filter_order_Dir_' . $this->params->get('main_div_name'), $this->params->get('order_dir','ASC'), 'word');
By
$pageInfo->filter->order->dir = $app->getUserStateFromRequest($this->paramBase . '.filter_order_Dir', 'filter_order_Dir_' . $this->params->get('main_div_name'), $this->params->get('vendor_order_dir','ASC'), 'word');
It will fix the ordering direction issue.

For the rest, the selection of the column is working fine.
Please understand that it is far better to use numeric values instead of text if you want to perform a sort ; because that is made directly by the database.
So please use numeric data for the "value" of the "values".

About your requests.

1. I understand your request but I can't add that feature directly in the HikaMarket settings.

But it is already possible to create such kind of feature thanks to a custom plugin, using the trigger "onBeforeVendorListingDisplay".
The plugin "HikaMarket / Vendor Location" is a sample of plugin which is using that filter in order to filter the vendors depending the location given by the user.
Future version of HikaMarket will also have trigger to allow to extends the settings of the menus/modules, like HikaShop currently have. The design of the menu/module edition will also be improved in order to have the same look that HikaShop one.

2. I'm sorry but your configuration looks wrong to me.
You're using an "Access Level" so that's logical that the customer field is not display for everybody in the front-end.

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.
Last edit: 9 years 3 weeks ago by Jerome. Reason: fix file path

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

  • Posts: 158
  • Thank you received: 6
9 years 3 weeks ago #218907

Jerome wrote: In the file "" please replace


Which File?

Jerome wrote: I'm sorry but your configuration looks wrong to me.
You're using an "Access Level" so that's logical that the customer field is not display for everybody in the front-end.


Ah, that makes sense. I thought Access Level meant who could actually configure these custom fields. Of course it's for who can see them. Facepalm.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 3 weeks ago #218908

Hi,

I have edit my previous message ; little mistake with the clipboard :)

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: 158
  • Thank you received: 6
9 years 2 days ago #221387

Hi Jerome,

I have now updated the file "components/com_hikamarket/views/vendormarket/view.html.php" with the code you provided and when I change the order from ascending to descending, it does change the order. This is an improvement. The next problem is that I have sorted the members in the menu item based on a custom field called "Membertype". In membertype I have the Types sorted in the order that I want them to appear on the menu item page. The problem is that the menu item display is not acknowledging that order. Instead it is sorting them by the custom field membertype using alphabetical sorting. I would like it to be sorted the way I have them ordered in the custom field, like this:



Instead I am getting Artists-10% first and the rest of the Types alphabetically.

Thanks for you help on this.

Dawn

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 2 days ago #221388

Hi,

Please understand that it is far better to use numeric values instead of text if you want to perform a sort ; because that is made directly by the database.
So please use numeric data for the "value" of the "values".


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: 158
  • Thank you received: 6
8 years 11 months ago #224269

Hello,

I have updated the "Value"s in the custom field MemberType with numbers to see if that would fix the problem with ordering. It did nothing to get 1. Artist 25% to show up first on the Menu Item page "Vendors Listing".



Please advise what I should do next.

Thanks,

Dawn

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
8 years 11 months ago #224276

Hi,

Please understand that it is far better to use numeric values instead of text if you want to perform a sort ; because that is made directly by the database.
So please use numeric data for the "value" of the "values".


What I am trying to explain you is that you have to use numeric values :
1
2
3
4
5
...
and not values with special characters.

The other part is ; did you update your vendors after modifying the custom field values ?
Because if in the database, the stored value is still "Artist 25%" and "Author", but not "1. Artist 25%" and "6. Author" ; the sorting won't change.

The display of the custom fields is using the HikaShop custom field class and will convert the value (so, a number) into the corresponding "Title".
The value is just the data to store in your database.

After that, I see that you are still using HikaMarket 1.6.6 ; we have release HikaMarket 1.6.7 few weeks ago and that version is now stable.
www.hikashop.com/support/documentation/1...arket-changelog.html

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.
The following user(s) said Thank You: artisanwebandprint

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

  • Posts: 158
  • Thank you received: 6
8 years 11 months ago #224655

That worked, thank you!

Here's a screenshot of the configuration that allowed me to order vendors with a custom field:



And the Menu Item configuration for a list of Vendors:

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

Moderators: Obsidev
Time to create page: 0.073 seconds
Powered by Kunena Forum