How to build a store for each vendor ?

  • Posts: 7
  • Thank you received: 0
8 years 3 months ago #226640

-- HikaMarket version -- : 1.6.7
-- Joomla version -- : 3.4.8

i have "vendor page" for each vendor and a module in this page that have categories of vendors products (categories that vendor have product in it )
Now I want, when i click on a category see vendors products but i see all products in category (all vendors) , but How can i do?

Sorry if my language is not good :blush:

تشکر

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

  • Posts: 26019
  • Thank you received: 4004
  • MODERATOR
8 years 3 months ago #226686

Hi,

It is not a simple question.

The vendor page allow you to display some modules.
You can display a category listing module and synchronize that module with the vendor page ; so it will only display categories where the vendor have some products.
There is also a patch (for the next release) to display the sub categories based on the current vendor root category.
www.hikashop.com/forum/23-market-how-to/...-in-vendor-page.html

The category/product modules are HikaShop modules. HikaMarket is just modifying dynamically some filters in order to tweak the content.
But, the category listing module will display categories and the links for these categories will point on HikaShop pages.
There is no information in the URL to let HikaMarket create a filter and only display vendor products.

One idea would be to let that module point to a category listing menu but to add a parameter in the URL to activate an HikaShop filter.
But, unfortunately, the HikaShop filter system does not allow plugin to extend the system so for the moment HikaMarket can't create vendor filters.
If we do not use the filter system (or similar) ; the vendor information would be lost if you refresh the page or if you change the pagination. If the information is stored in the session, the customer won't be able to remove it in order to see the category with all vendors.

So, to summarize ; for the moment there is no built-in feature for that but we already have it in our TODO list for HikaMarket (and HikaShop) improvements.
I also hope that the new router system in Joomla will allow HikaMarket to generate cases which are not yet possible ; like having an URL like "/vendor-name/category-name".

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: mrsadeqij

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

  • Posts: 7
  • Thank you received: 0
8 years 3 months ago #226720

I created a plugin (hikavcat) that get a parameter (vendor id) of the URL and filter category and products of each vendor . but for add parameter to url i customed hikashop_contentLink() function in helper.php file .
but This file may be changed in the next update . what can i do ?

function hikashop_contentLink($link, $object, $popup = false, $redirect = false, $js = false) {

    //-start---------
    
    $vid = JRequest::getInt('vid', 0);

    if (JRequest::getInt('view', 0) == "vendormarket")
        $vid = JRequest::getInt('cid', 0);

    if ($vid != 0) {
        $link.="&vid=$vid";
    }
    
    //-end---------

    $config = hikashop_config();
.
.
.

Attachments:

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

  • Posts: 26019
  • Thank you received: 4004
  • MODERATOR
8 years 3 months ago #226743

Hi,

You can override a lot of things in HikaShop and HikaMarket but you can't override the core helper.
If you want, you can custom the views, the classes, the types, the other helpers (except the main one), the plugin views, the modules.

So I will more suggest you to customize the parts which use the function "hikashop_contentLink".
But you can't modify (redefine) that function without modifying the HikaShop main core file.

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: mrsadeqij

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

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