Categorize Vendors for frontend display?

  • Posts: 194
  • Thank you received: 13
  • Hikashop Business
7 years 6 months ago #250133

-- HikaShop version -- : 2.6.3
-- HikaMarket version -- : 1.7.1
-- Joomla version -- : 3.6.2
-- PHP version -- : 5.6
-- Error-message(debug-mod must be tuned on) -- : No error

Is there a way to categorize HikaMarket Vendors, such that we can have a menu item to a category of vendors?

eg. Clothing Vendors, Music Vendors, Service Vendors, etc. A menu item would display all "Clothing Vendors". A Vendor's listing would then link to their vendor landing page and products.

Possible?


3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters

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

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
7 years 6 months ago #250176

Hi,

In HikaMarket you can create "vendor categories".
By default, all vendor categories will be created under the same parent category :
www.hikashop.com/support/documentation/1...nfig_market_category

But, thanks to a custom field and a little plugin, you can control dynamically where the vendor category will be.
www.hikashop.com/support/documentation/1...VendorCategoryCreate

/**
 * @param $vendor - the vendor object
 * @param $category - the category object that we will use for the creation
 * @param $do - boolean value. Set it "false" to stop the category creation
 */
public function onBeforeVendorCategoryCreate(&$vendor, &$category, &$do) {
}
Using that trigger you can change the "category_parent_id" value of the category object.
And with the vendor object, you can read the value of the vendor custom field you created (to let the vendor choose his "section").

We also recommend you to use the setting "Link vendor category to vendor page by default" ; so you just have to create category listing and by clicking on a vendor category the user will be redirected to the HikaMarket vendor page.

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: 194
  • Thank you received: 13
  • Hikashop Business
7 years 5 months ago #251694

I've had the "Link vendor category to vendor page by default" setting enabled, however, the vendor category still links to the standard Hikashop sub-category display instead of the vendor landing page.

So, when I go here and click on the vendor category - isb.3by400.com/shop/learning-tracks ...

My Vendor category goes here - isb.3by400.com/shop/learning-tracks/category/14-kim-kraut

But I would expect it to go to - isb.3by400.com/vendors/vendor/show/2-kim-kraut


3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters
Last edit: 7 years 5 months ago by 3by400.

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

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
7 years 5 months ago #251708

Hi,

I think that I will have a little discussion with the HIkaShop team in order to talk about some modifications made in the HikaShop category listing view ; where I can see several problems and errors.
One of them is the introduction of a bug which impact HikaMarket and I'm fan of it...

You can edit your category listing view and add the line that the beginning

<?php $link = $this->getLink($this->row); ?>

Then you will be able to replace every reference of
echo $this->row->link;
By
echo $link;

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: 25994
  • Thank you received: 4004
  • MODERATOR
7 years 5 months ago #251779

Hi,

I talked with the HikaShop team and we arrived at a compromise :)
You can keep the HikaShop views with the " $this->row->link " but you will need to modify one HikaMarket file and an HikaShop one.

administrator/components/com_hikamarket/classes/category.php
Replace

$row->override_url = hikamarket::completeLink('vendor&task=show&cid='.$vendor_id.$vendorItemId);
By
$row->override_url = hikamarket::completeLink('vendor&task=show&cid='.$vendor_id.$vendorItemId);
if(!empty($row->link)) {
	$row->link_origin = $row->link;
	$row->link = $row->override_url;
}

components/com_hikashop/views/category/view.html.php
Replace
if(!empty($cid->override_url))
	return $cid->override_url;
By
if(!empty($cid->override_url))
	return $cid->override_url;
if(!empty($cid->link))
	return $cid->link;

And it wil introduce a compatibility for HikaShop 2.5, 2.6 and 3.x

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: 20
  • Thank you received: 0
7 years 1 month ago #262787

Hello,

I want to categorize HikaMarket Vendors to have a menus for each vendor categories.

Menu 1 - Product Vendors ( This menu would display all "Product Vendors")
Menu2 - Service Vendors (This menu would display all "Service Vendors")

A Vendor's listing would then link to their vendor landing page and products.

Problem : I did not understand the explanations of this post.

Can you please give me the full code to implement this option, as well as the file I need to modify?

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

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
7 years 1 month ago #262795

Hi,

I'm afraid that I don't understand your request and what you want to do.

The explanations in that post already gave precise instructions on what file should be modified and what should be modified.
Now, if you have a recent version of HikaShop and HikaMarket ; these modifications would be already included.

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.

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