Products visible by customer type?
I've seen questions about this before, but can't find them now.
There doesn't appear to be any way to allow restricted access to any products.
For example, I've figured out how I can enter Paypal subscription plans into Zencart (though they are still handled strictly through Paypal).
But this would allow me to track the sales through Zencart and to have them uploaded to ShipStation along with everything else.
I created a product called Subscription Sales with an attribute for each plan, and it's working well.
But it's visible to everyone.
I used bold type and big 'FOR OFFICE USE ONLY!' phrasing, but it's still not a really professional way to do this.
And inevitably someone is going to try to create a subscription with it no matter how many places tell them not to do it.
I was hoping v1.5.7 would have something to allow some kind of product visibility parameters, but I don't see anything. All I can do now is make it non-visible except when I need to use it and hope no one else tries to use it themselves during those brief periods.
Re: Products visible by customer type?
Re: Products visible by customer type?
Quote:
Originally Posted by
dbltoe
Thanks, yes, I believe it would work for now. Unfortunately, it appears that it does not work with v1.5.6 and higher. Since I'm actively working on installation of the latest version, I don't think there's much point in installing this now. I'll go along with what I'm doing until it's (hopefully) updated.
Re: Products visible by customer type?
Maybe post a request to the support thread to show that there's interest.
https://www.zen-cart.com/showthread....omer-or-Group/
Re: Products visible by customer type?
Quote:
Originally Posted by
swguy
Several others have already done so, but I added my name to the queue.
Re: Products visible by customer type?
Given that this is highly specialized for your specific store, editing code directly to enforce it seems sensible.
In v1.5.7 there's an /includes/functions/functions_products.php file with two places that you could alter the logic.
Here are some considerations you could explore:
- You could write an observer to trigger when NOTIFY_PRODUCT_INFO_PRODUCT_STATUS_CHECK is fired. That way you can encapsulate your code in a separate file that doesn't touch any core code.
Here you could use whatever other logic (customer ID, or admin-login-as-cust flag, etc) you talked about the other day in another thread for placing admin orders on behalf of the customer and wanting to restrict payment choices. Same thing could be used to intercept the specified product ID number and respond as though it doesn't exist if it's just a normal customer who is shopping.
- Or if you don't want to write an observer class for that notifier hook, you could put similar logic directly in the function file mentioned, either in the "zen_get_product_details()" function's query (not where I'd put it, but you "could" put it there) or in the "zen_product_set_header_response()" function, someplace near where the NOTIFY_PRODUCT_INFO_PRODUCT_STATUS_CHECK hook is triggered.
(I'll add as a tiny teaser: upcoming v1.5.8 has a "customer groups" feature, independent of "group-pricing", and has functions available for testing whether the current customer is a member of a required group for enabling/disabling something.)