News:

Looking for documentation? Take a look on our wiki

Main Menu

Shopper Groups and cart function

Started by bpos, July 14, 2021, 03:55:53 AM

Previous topic - Next topic

bpos

VM 3.8.8 Latest as of July 13

I have guest, default registered, retail, discount and wholesale shopper groups. I want to show pricing ONLY to the wholesale group. In other words if someone other than a wholesale shopper logs in they should not see any pricing for their shopper assigned group unless they are assigned wholesale.
I thought by unpublishing all other groups except for guest would do the trick.
The problem is if you unpublish default registered group that it still shows "add to cart" button on default assigned items. Does not show price but if you click on "add to cart" it will add that item to the cart without knowing any price? Once in the cart you can actually see pricing of the default assigned item.
Currently I have 3 different prices set for each item showing different price per selected group? All works as it should when all shopper groups are enabled.
In my case I only want wholesale people to shop during certain times. And ideally be able to enable all other groups at other times without showing "add to cart" button on items not belonging to wholesale group?

Can this be done?
Thanks

Jörgen

There is a test in the template files, addtocart.php perhaps, that checks if addtocart is to be shown.

Do you have template overrides ?

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

bpos


Jörgen

Great, check the overriddes  ;D

Jörgen
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

Studio 42

If you add price only for a shopper group, it should work.

bpos

That`s what I thought too but it did not work.

Then i thought -- just unpublish shopper groups not in use. Did not work either.


Jörgen

Check with vmbeez3 and of it works then you must changes your overrides.

Jörgen
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

bpos

So you are saying this should work but my overrides are keeping it from doing what I need?

Jörgen

I can not know for sure, I do not know what kind of overrides that You are using, but the template files make this happen. If You have overrides these could mess things up.

Jörgen
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

bpos

I see. I was just wondering if this was something native that Virtuemart is supposed to be able to do?

When I unpublish any shopper group should they be hidden on the front end at that point? Hense shoppers should be gone since they do not have a visible group to join?

Jörgen

#10
It does not works like that. Then you could never get new customers they do not belongs to any groups.
Prices belonging to certain shopper group ONLY show when a shopper belonging to that group is logged in.
Same goes to shopper group assigned products.
Other users do NOT see these prices or products.

What have you actually tested?

Jörgen
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

bpos

Without altering with overrides I have only tested by unpublishing certain shopper groups and leaving other published?
Admin verification is set.. so no new applicants gets automatically assigned to any group automatically.
I have not tried to sign up while default shopper group is unpublished? In my case I dont have to worry about new register`s signing up because I have not acticated them. Unless they are signing up in a published shopper group?

I would get new customers if they signed up to wholesale shopper group? (if it was published and I activate them?) Besides wholesale customers need to be vetted so I know they are wholesale eligible?
Regular customers would stay in a signed up state until at some later date I activated them?

Jörgen

Your explanation does only tell me that you di not let user register on their own, that is fine but doe snot matter in this case.

You still have not shown what you have done and if it works or not ?

In every PRODUCT you have a couple of choices, product belong to shopper group, no one else besides that shopper group sees the product.

In every PRICE you can select what shopper group the price belongs to, only those groups see the price.

This works, if it not works for You, then you have faulty overrides, test with VMBeez3 template.

Regarding user and shopper groups I have no Idea what are you are trying to accomplish. Assign users to the correct user group, done.

Correctly assigned prices and product are only shown to the correct shoppergroup. You do not have to publish and unpublish user groups, Why would you do that ?

Jörgen @ Kreativ Fotografi


Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

bpos

I cannot let all user groups shop year round. Sounds dumb I know but that`s how it is.

I have 3 user groups which all try to login year round. There are certain times of the year that ALL user groups can purchase.

Some how I need to find a way to disable certain user groups so they dont log in and try to purchase. Trying to find specific user group individuals and disabling each one takes too long.

Currently Wholesale user group individuals can purchase. I will at some point need the ability to enable all user groups to shop again.

Pricing.
I have 3 prices assigned to each user group. 1 price per user group. Each user group can see their user group assigned price.

It seemed logical if I do not want specific user groups to be able to shop and see price and add to cart function that I might unpublish that user group until such time I can let them shop again?

That`s about as simple as I can explain this to you.

What do you suggest if not unpublish user groups?

Studio 42

bpos,
it's really hard to understand why it not worf, because we do not see how you have set your shop config > pricing , if the template has some overrides...
You have for eg an option in Shopper Group directly to display only some prices, so if you want hide price, you can do it using this settings.
For the add to cart button, you can uncheck  "call for price" in the ocnfig or check the user shoppergroup in the PHP code