Multiple vendors accessing same product catalogue

  • Posts: 9
  • Thank you received: 0
9 years 7 months ago #167699

-- HikaShop version -- : 2.3.2
-- HikaMarket version -- : 1.4.2
-- Joomla version -- : 3.3.3
-- PHP version -- : 5.4.7
-- Browser(s) name and version -- : Chrome 36.0.1985.143

Hello HikaShop-Team,

some time ago I bought your HikaShop/HikaMarket-Bundle. After doing a some other work at my website I am now starting to set up the e-commerce part.

The website will have many different vendors which will all sell wine.

I like to have one master catalogue where all the avaiable wines are listed. I planned to this with "Your Vendor" in HikaMarket. This vendor will not sell any products. Its only aim is provide the master catalogue of products. Afterwards I created some product categories and products.

Then, I created a test vendor. In the vendor control of the test vendor I like to like to have the same products like in the master catalogue. So that the test vendor can change for example the quantity and than list it under is products.

At the moment I see all categories from the master catalogue but cannot see any products I added there. I tried different approaches like changing the category options in the HikaMarket-Menu or enabling the duplicate products plugin for the master catalogue. However, nothing worked.

Could you please point me in the right direction?

Thanks a lot in advance!

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

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
9 years 7 months ago #167703

Hi,

HikaMarket have a plugin called "duplicate products".
The goal of this plugin is to copy all products from a category to assign them to the vendor just created.

The plugin is not completely finished, some features are still missing (like the duplication of the categories too) but we can see to improve that plugin with you (we didn't have a lot of feedback so it is difficult for us to know what improve ; or the needs of the users).

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: 9
  • Thank you received: 0
9 years 7 months ago #167734

Hello Jerome,

thanks for the quick reply.

Like I read in your reply I was on the right track with using the "duplicate products" plugin. I had a look at the plugin code.

I need the plugin to do the following things:

1. When a new vendor is created he should have access to the master catalogue. This catalogue is shared by all vendors. There copying the current master catalogue to the vendor directory migth a solution.

2. If a vendor creates a new product, this product should also be avaiable for all other vendors. Duplicating the product after creation to all other vendors and the master catalogue might be the way to go.

3. If a vendor edits a product, this update should be avaiable for all other vendors. Same solution as in point 2.

4. It might be nice, if I (the admin) could confirm new products/edits of vendors, before they are published (duplicated) to all other vendors. (I think the most difficult feature)

Do you see any problems or unwanted effects with this requirements and your current shop infrastructure?

Since I already did some alterations on your software, I would like to implement the features on my own. This way I get to know your software better. However, I would be happy if you could help me to check the finished plugin for any bugs or problems?

Best regards,

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

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
9 years 7 months ago #167740

Hi,

1. It is the main goal of the plugin.

2 - 3. I don't think that is a best solution for the management of your store.
The goal of HikaMarket is to separate the product so they can have their own life.
In your case you want to copy all products and make them be the same for every vendor.
At this moment I will recommend you to use a "vendor selection" custom field to let the user choose the vendor of the product ; and have just one single instance of the product.
It will have some side effect on the edition of the products, which will require some features which are in our TODO list but not available for the moment (product history).. So we do not allow vendors to edit products which are not their (but we think about an option to have something like an open store with history and validation of modification).

4. It is already the case if you remove the ACL "product / edit / publish".
Vendors won't be able to publish their products which will be unpublished by default.
There is an HikaMarket email which notify you when a vendor create a new product ; so you can be notify for the validation of this product.

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: 9
  • Thank you received: 0
9 years 7 months ago #167903

Hello Jerome,

I saw that you have updated the HikaMarket component. Thanks a lot for putting the work into the duplicate products plugin.

Unfortunately, there are two problems:

1. The second SELECT-Statement in the duplicate products plugin has two syntax errors. I think you need to do a join of the product_category and the product table to access all necessary columns. In addition, the opening bracket for the last WHERE-argument is missing.

Original:

$query = 'SELECT a.product_id FROM ' . hikamarket::table('shop.product_category') . ' WHERE b.product_vendor_id = 0 AND a.category_id IN '. implode(',', $categories_id).')';

Fixed
$query = 'SELECT a.product_id FROM ' . hikamarket::table('shop.product_category') . ' AS a RIGHT JOIN ' . hikamarket::table('shop.product') . ' AS b ON (a.product_id=b.product_id) WHERE b.product_vendor_id = 0 AND a.category_id IN ('. implode(',', $categories_id).')';

2. Currently it is not possible to delete vendors. When trying to delete a vendor you are forwarded to the confirmation screen, but after confirming you get an error message "INCORRECT_DATA".

I will try some things with the plugin an let you know my experience.

Regards,

Andreas

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

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
9 years 7 months ago #167920

Hi,

1. You are totally right.
I wanted to add a restriction in order to not duplicate all types of products but because I publish the HikaMarket 1.4.3 in a bit of hurry (due to the bug on the vendor automatic creation), I release the "duplicate product" without any test...
I'll update the HikaMarket package with your fix ; thanks !

2. I tried the feature "delete vendor" just before the release (because there were a display bug) and it did work good for me.
The "INCORRECT_DATA" (I have to add the translation in the file, sorry) is displayed when the checksum of the vendor id you want to delete is not matching (or if you want to delete the vendor 1, which is forbidden).

So, let's test other thing for this check.
In the file "administrator/components/com_hikamarket/views/vendormarket/view.html.php" please replace

$confirm_value = md5(implode(';', $vendor_ids));
By
JArrayHelper::toInteger($vendor_ids);
$confirm_value = md5(implode(';', sort($vendor_ids)));
To force the id as number and sort them before the processing of the "confirm value".

And in the file "administrator/components/com_hikamarket/controllers/vendor.php" replace
$check = md5(implode(';', $cid);
By
$check = md5(implode(';', sort($cid));

If you still have some INCORRECT_DATA please let me know.

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: 9
  • Thank you received: 0
9 years 7 months ago #167953

Hello,

I tried you changes regarding deleting a vendor and now it works again. Thanks!

However, there is still something strange. Like before the change you always see on the confirmation screen a row with the vendor you like to delete and below a second row which is empty. For example:

1. Vendor 1
2. empty

Regards,

Andreas

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

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
9 years 7 months ago #167962

Hi,

I have update the HikaMarket 1.4.3 package in order to publish the fixes I gave you.
It includes other modifications for the "vendor delete", to improve the display and fix this "empty" line.
Please re-download HikaMarket.

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

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

  • Posts: 9
  • Thank you received: 0
9 years 7 months ago #168049

Hello Jerome,

thanks for the quick update. I have installed the new versions and everything works smoothly.

However, I like to make another suggestion for the hikamarket package which you could think about for future releases.

The duplicate products plugin helps me already a lot. Since my vendors are using often the same products. I think I am not the only hikamarket customer who uses the package an has vendors selling the same product. You emphasized that it is important that every vendor has its own product version, therefore the duplicate products plugin creates a new version for every new vendor. I had a look a the product data table and in the case of multiple vendors selling the same product it would be very useful to split the table in for example "product_maindata" (like name, descrption, weight, size and so on) and a "product_vendordata" (like sale_start, sale_end, max_per_order, min_per_order, waitlist and so on). This would heavily reduce the amount of duplicate data in the product table, since the maindata and vendordata tables could be joined before a request.

Best regards

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

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
9 years 7 months ago #168056

Hi,

I understand your requirement and your idea but the structure of HikaShop does not allow HikaMarket to do that so easily.
HikaShop have a "main - variant" organization, which could be feet to your needs some of a way...

But if I put a partial copy in HikaMarket for the products, it won't be possible to override every time the load of the product in order to put the content of the original product into the vendor product... (Unless we are using characteristics)

That's why I firstly recommend you to use the "vendor selection" ; using a custom field you can have one single instance of a product but assign it dynamically to a specific vendor.
But if in your case you want that vendor can override some parts of the products (like the price or the date of sale), the best will be to use the variant system.
HikaShop will still have one product entry per vendor but if you don't give access to an element (like the product description), the description of the main product will be used ; by inheritance.

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.092 seconds
Powered by Kunena Forum