Display the number in stock for certain groups

  • Posts: 152
  • Thank you received: 0
12 years 11 months ago #38162

I just upgraded to Business because we are looking to show different information to different groups.

For the Staff group, is it possible to display the number in stock on the product pages? I could not find any reference to this in the back-end options.

Thanks

Jim

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

  • Posts: 83103
  • Thank you received: 13415
  • MODERATOR
12 years 11 months ago #38267

Hi,

The stock display cannot be restricted to only some user groups. That would require to modify the file "quantity" of the view "product" via the menu Display->Views to add the check on the user group directly yourself;

The following user(s) said Thank You: Jims

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

  • Posts: 152
  • Thank you received: 0
12 years 11 months ago #38281

Thanks, Nicolas.

I will look into putting a separate page on the website that shows a spreadsheet with the current stock numbers. I believe that I can set up the users so that that page is not visible to the public, but only visible when registered user log in.

I've been searching the documentation to see how user groups can be used in Hikashop Business version, but I could not find anything. Do you have any documentation for that area?


Also, a related user group question, the owners of Potluck Ceramics have asked that the website be Catalog Mode for the Public, but allow on-line sales for wholesalers (logged in). Given the placement of the setting to put Hikashop into Catalog mode, I told them that this was not possible. But is there a way of doing that? Could we actually have two different copies of the website, one in Catalog mode and the other in Sales mode but linking them to the same Joomla database?

LATER EDIT: On second thoughts, I realised that the catalog mode setting was likely to be in the database as well as the stock data, so having two sites link to the same data base would not work. So the question becomes, if there are two separate sites: potluckceramics.ca and wholesale,potluckceramics.ca, what's the best way of keeping the product catalog the same for both sites?

Thanks

Jim

Last edit: 12 years 11 months ago by Jims.

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

  • Posts: 83103
  • Thank you received: 13415
  • MODERATOR
12 years 11 months ago #38364

Mmmm. I'm not sure I'm completely following you. If you want two websites with some of the data synchronized, you should have a look at the extension Joomla Multi Site which allows you to have several wesbites but we common data. I've never used it and I'm not sure I understand what you want to achieve but it might be worth investigating.

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

  • Posts: 152
  • Thank you received: 0
12 years 11 months ago #38368

Thanks, Nicolas.

The need is for a public site (no login) which is Catalogue mode only, but if a wholesaler logs in, the Catalog mode would be turned off and the site would be for online sales for wholesalers only.

Question: Is that scenario possible with a single site?

If not, is the setting for Catalog Only stored in the joomla database? If it is, then the Multi-site sharing the same database would not work.

In that case, I would run two sites, potluckceramics.ca and wholesale.potluckceramics.ca and try to make sure that the products are identical in both sites, probably by running export on one and importing the export file into the other?

Jim

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

  • Posts: 83103
  • Thank you received: 13415
  • MODERATOR
12 years 11 months ago #38512

You could have two websites, but managing both websites will be cumbersome compared to change a bit the system to handle the catalogue mode option based on the user group.

It's just 2 lines of code to add in that previous view file I mentioned (supposing that the catalogue mode is turned on by default):

$user = JFactory::getUser();
if(!$user->guest) $this->params->get('catalogue',0);

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

  • Posts: 152
  • Thank you received: 0
12 years 11 months ago #38518

Thanks, Nicolas.

A couple of questions to clarify the picture for me:

1. If the catalogue mode is turned on by default, how would people in the wholesale group see the add to cart options?

2. If a user views a site with catalogue option turned OFF, but does not log in to the site, would hikshop set that user as "guest"?

Thanks again

Jim

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

  • Posts: 83103
  • Thank you received: 13415
  • MODERATOR
12 years 11 months ago #38539

1. Since they are logged in, they would see the add to cart button.

2. Yes. Not logged in = guest. Logged in = not guest.

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

  • Posts: 152
  • Thank you received: 0
12 years 11 months ago #38582

nicolas wrote: 1. Since they are logged in, they would see the add to cart button.


Thanks, Nicolas,

But I'm missing part of the picture here.

I added the code to the quantity file as you indicated. I put it in the first block of <?ph.. code right after the defined statement.

But:
If the catalogue mode is turned OFF, then the guest user (someone not logged in) does see the cart.
If the catalogue mode is turned ON, then a logged on user does NOT see the cart.

What am I missing here?

Jim

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

  • Posts: 83103
  • Thank you received: 13415
  • MODERATOR
12 years 11 months ago #38704

Hi,
I made a typo in the previous code. It should have been:

$user = JFactory::getUser();
if(!$user->guest) $this->params->set('catalogue',0);

That should work better :)

The following user(s) said Thank You: Jims

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

  • Posts: 152
  • Thank you received: 0
12 years 11 months ago #38721

Many thanks, NIcolas, that works well now.

I don't understand WHY it works, with Catalog mode turned ON, but it works and that's all that matters.

Jim

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

Time to create page: 0.069 seconds
Powered by Kunena Forum