Trouble with new products created by vendor

  • Posts: 2143
  • Thank you received: 747
9 years 4 months ago #206743

-- url of the page with the problem -- : local & live
-- HikaShop version -- : 2.5.0
-- HikaMarket version -- : 1.6.3
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.5.3
-- Browser(s) name and version -- : any
-- Error-message(debug-mod must be tuned on) -- : none

Hi again,

Told you there's more... ;)
But maybe this one is me setting up something wrong. In that case, many thanks in advance for enlightening me!

FYI, I'm in my same "clean" environment as before.

Goal:
I want vendors to create new product only into a specific category named "Standby" (same for all vendors), outside the usual categories, best in root, not even under "Product category" (there's a reason for that due to a previous discussion with Nicolas).
I want vendors to be able to (un-)publish products, with Admin/Main Vendor to be able to (dis-)approve, and moving the product into the correct category while approving.
I created a menu item for "Special" (= Admin) access only with a product listing for the category "Standby" to be able to see/edit/approve the products as Admin/Main Vendor.

Trouble is that, in the frontend, the products show only in the vendor's product listing. And in the backend only in the editing page for the vendor, not even in the shop's product page. The products are in the database, but "not everywhere" (see below).
Initially I thought it was related to custom product fields (which can cause trouble as well), but trouble persists even if all custom product fields are unpublished/unrequired.

My current settings:

ACL:



Category tree in the shop:


Options:
Tried different settings but the trouble is the same for both.
First this, which worked fine in older versions of HikaShop & HikaMarket:

Then this, as reading the documentation rather confused me:


Symptoms/trouble:
  • Products show in vendor's frontend product listing, he can edit them etc, and he see's the "not approved" dot.
  • Products show in the backend in the editing page for the vendor and can be accessed by Admin (though there's a problem with custom product fields, but that's a different story).
  • No products in the Admin's frontend listing for category "Standby" - probably because
  • No products in the shop's backend product listing ("Standby" shows empty) - probably because
  • Products are in the database table #__hikashop_product, but there's no related record in the table #__hikashop_product_category!
(Note that product with ID #1 was added by the Admin through the backend. Obviously, this is all about the other products added by the vendor.)

Table #__hikashop_product:


Table #__hikashop_product_category:


Thanks for looking into it,
T


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 4 months ago #206769

Hi,

For what you are trying to do, the best is to use the "product approval" feature.
www.hikashop.com/support/documentation/1...tml#config_main_main

So when the product is created by the vendor, product is "unapproved", the vendor can publish/unpublish the product, it won't affect the "approval" and the product will stay hidden.

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: 2143
  • Thank you received: 747
9 years 4 months ago #206788

Hi,

That's all clear. But this isn't what it's about.

Maybe you don't understand what I'm saying: Approval or not, publishing or not - none of that is my issue here, at least not yet. I can't even TEST the approval feature because even as Super User I don't see the products anywhere in the frontend! (Which I understand would be necessary to use the approval feature.

What I'm saying is that the products added by vendor are not accessible at all. Only the vendor himself, or for the Admin through the vendor editing page. Nowhere else. And that's my problem.

Trouble is that, in the frontend, the products show only in the vendor's product listing.

Nowhere else in the frontend, except for the vendor himself.

  • No products in the Admin's frontend listing for category "Standby"...


And not even in the backend product listing!

I gave you settings to review. Anything wrong, so it prevents the products from showing up under the desired category? Any other settings you need to know?

I gave you screenshots of database tables. Anything I can do for the relationship product/category to be recorded in the table #__hikashop_product_category? Because obviously that's missing...


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 4 months ago #206799

Hi,

I think that the only issue you currently have is the missing product category.
When the product have a category, you can see it in the product listing (if you do not have the "no vendor" filter)
You can use a "check database" in the HikaShop backend in order to set a product category to product without a category.

The "waiting approval" and "product template" products can't be displayed in the HikaShop backend.
I think I'll add a special product listing in the HikaMarket backend for the product approval, like I might add a special tab in the front-end.

For the moment the product approval are just available in the front-end, with the special icon and the "approval" button.

I'm currently writing a patch but I think that I will release it directly in HikaMarket 1.6.4 ; regarding the code I want to add for the various checks, it will be difficult to paste it here in the forum. And I might add other checks in HikaShop product class too (for a future release).
Nicolas should activate the automatic update for HikaShop 2.5.0 in few hours, so I will be able to release a new version of 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.

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

  • Posts: 2143
  • Thank you received: 747
9 years 4 months ago #206824

Jerome wrote: I think that the only issue you currently have is the missing product category.
When the product have a category, you can see it in the product listing (if you do not have the "no vendor" filter)
You can use a "check database" in the HikaShop backend in order to set a product category to product without a category.


I seem to have a number of problems, and I discover more (which I keep telling you about) as I'm trying to get it to work. And I haven't even gotten to the approval feature, because I'm not ever getting any unapproved products to show for the Admin.
However, it seems the approval feature is the culprit, at least when simultaneously trying to "force" a certain product category for new products added by vendor, means with ACL for category choice/edition turned off.

I posted here my ACL settings. I can't give the vendor access to categories, because then he can throw his product all over the place (around 100 categories), anytime, again and again, and no shop owner is able and willing to fix this all the time for all vendors who think it's cool and improves their visibility. Even if I don't give him the full category tree but only one category, he can still delete it!
I posted here my categories. The one category where new vendor products shall land is "Standby", it exists and is published. Only, no product added ends up there with approvals on, category ACL off, and any setting under Category Options. The empty table #--hikashop_product_category is proof.
I posted here variations of my Category Options. Whichever way I specify "Standby" there, in combo with approvals on and category ACL off no added product lands there. They ONLY show in the frontend vendor product listing (cPanel). And in cyberspace, maybe. Even to delete them, I must go into the database, replace "waiting_approval" with "main", then I can delete them in the backend.

Why doesn't it work together? I want the approval feature and the forced category. What config will do?


So, testing approvals is still in the future, not a glimpse of that mysterious button, yet.
Hang on... please tell me that there's not only an "Approve" button, but also a "Disapprove" button (after approval). Obviously, one needs them both, in case Admin needs to deactivate a vendor product without deleting it - anytime after approval has been granted. Publishing is not effective - that's what the vendor needs to disable his product, because he must not be able to delete it forever.
In short, if there's no "Disapprove" button replacing the "Approve" button after approval, the whole approval system is only a one-way street, not complete, and hence, effectively not usable... in other words, I don't even need to investigate anything including approvals if it isn't complete.

And if it is complete in that regard, Admin MUST have access to unapproved products in the backend. Imagine this:
Vendor adds new product, which is unapproved. Means Admin only sees it in the frontend. But what if vendor sets it to unpublished? Admin doesn't see it anywhere!!! He'd need to go into the backend vendor edition page to see it. Even to delete it, he'd need to go there and publish it first, then approve it, then delete it. Workflow: Frontend check: nothing. Backend check in vendor edition page: yes, publish. Frontend check, yes, approve. Backend check in product listing: yes, delete. Wow, that's cool................ :silly:


Now back to my original problem: getting anything unapproved to display to Admin under few certain conditions. Jerome, I've basically spent all day with getting something to work which should be darn simple and only a few clicks, trying all combos of switches, trial & error to no good end and no joy. And in between I'm writing my little books here. I do understand that things are under continuous development and probably never really perfectly finished fitting everyone. But I'm asking now for a simple set of config settings to get going - unless there's no way to get it going at this time, due to a bug or so. Please help. Try to simulate, and if you have it, tell me how you did it. Maybe you post screenshots this time? ;)

Again: Approvals yes. One forced category yes. Other categories no. How?

Thanks.


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
Last edit: 9 years 4 months ago by lousyfool. Reason: typo...

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

  • Posts: 2143
  • Thank you received: 747
9 years 4 months ago #206830

By the way...

Jerome wrote: ... the "no vendor" filter ...


What and where is that?


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

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

  • Posts: 2143
  • Thank you received: 747
9 years 4 months ago #206862

Me again. As frustrating as the past day has been, of course I don't give up so soon. ;)

Tested some more. Well, a whole LOT more. It all boils down to two issues:

1.) Product category ACL: if unchecked, I can do what I want, the product is not being added to a category, no record added to the ...product_category table. Which wasn't an issue in previous versions, AFAIK - I could uncheck that ACL and a new product added by vendor would still end up in the "forced" category. Not anymore...
"Check database" only helps if the approval system is turned off. If turned on, it won't change, the product still has no category.
Again, I can't give vendors access to the categories. Not ever! So, if no fix in sight, my workaround would be to check the category ACL box, but hide the category field by removing it in a view override. Ha.

2.) Very probably something is wrong with Main Vendor/Admin for him to be able to see unapproved products in the frontend. See my post here: www.hikashop.com/support/forum/20-market...-and-acl.html#206859
Since my post there, I found this , but guess what... i had added the Super User as user to the Main Vendor before, even gave him all green dots in "Access", and still no unapproved products in the front!
I think there's still something wrong with it, and I'm on my knees begging for your help and a hint where else to look.

Thanks & till next time,
T


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 4 months ago #206904

Hi,

Please see the forum in order to know how and why the "product approval" has been added in HikaMarket :
www.hikashop.com/forum/20-market-feature...min-main-vendor.html
So yes, the feature is not fully completed because it's something added for that request and which was not part of the global development schedule.
And it's something added in a very short delay ; How I could implement all required elements in the HikaShop backend ?

So I can add in the TODO list a full approval feature but for the moment that's not the current development for HikaMarket.
As you could see in the forum, the feature request for the "product approval" was not very detailed.
And I'm the HikaMarket developer, I can submit patches for HikaShop but I am not managing the project ; my patches and my features request has to be approved !

Why adding a "disapprove" button which will just delete the product ? You just have to delete the product.

So... Before the next release you can use that temp fix, replacing in the HikaMarket product class

	if(hikamarket::acl('product/edit/category'))
		$productClass->updateCategories($product, $status);
By
	if(hikamarket::acl('product/edit/category') || $new)
		$productClass->updateCategories($product, $status);
So you will be able to fix your issue with the category and the approval creation.

About the "no vendor" filter ; when you're in the HikaMarket front-end product listing with the administrator, you have some filters at the right (with the "search"). In these filters you will see a "vendor filter".

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

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

  • Posts: 2143
  • Thank you received: 747
9 years 4 months ago #206937

Hi Jerome,

Thanks again for one more good answer. And apologies if I'm too demanding. Or haven't followed up on the approval project since my own (!) original posts... ha! But I was sure busy with other stuff, too. And I guess I was assuming that you took the project forward, anyway, as time and co-op with HikaShop allows.
Fact is that it'd come at the right timing for me these days - otherwise I'd sure not be sooo much "interested". You took it this far - exciting! And you see me indicating that I'm willing to a.) live with workarounds for at least the time being, and b.) I'm using plural ("we", "us") in the other related thread over here - meaning I'll happily contribute where possible, and if only "conceptually".

BTW, and maybe it was confusing or I wasn't all clear enough, but I'm suggesting an "approval/disapproval" toggle (just like publish/unpublish, except for "admin only") to NOT delete - I absolutely want to avoid deletion for the admin to only hide the product. Not sure what the technical implications are, but disapproval should set the product back into the unapproved status, just like right after the vendor created it = "waiting_approval" in database lingo. Somehow I'm thinking it can't be too difficult to create the toggle because "waiting_approval" does already exist, and it basically does what it needs to do, I'm sure. Well, more on this, also compared with deletion and unpublishing also see in the other current thread started by "mymall".


I'll try the snippet asap - thanks for that. I hope it'll do, so I can leave you in peace on the subject of the admin being "blind" for unapproved product and we can close this particular case. And I'm fine with moving on, e.g with the approval thingy - as your time and energy allows. In good hands with you... oh, and sure good for all of us out here.

Thanks a lot once again,
T


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 4 months ago #206946

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