Question About Catalogue Mode

  • Posts: 38
  • Thank you received: 0
13 years 8 months ago #8536

Hello,

I have a question regarding Catalogue Mode in HikaShop. I want to use HikaShop (business version) on two websites in the near future. This particular question is for one of the two websites. For one of the websites, I would like to know if Catalogue Mode will work based on what I want to do describe below.

I want to have a website that is essentially a cataloge for my company's products, which will display information about all the products we offer, including their list price, but not allow the general public to purchase any products. The general public will be allowed to register themselves on the website so they can signup for newsletters, etc. They would be automatically registered in the user group "Registered".

Our products are sold exclusively through dealers, who will be individually registered by an administrator in the back-end of the site into various user groups "Dealers 1", "Dealers 2", etc. I want a regisered "Dealer" to be able order products from the same catalogue that is shown to the general public, but only they will be allowed to order products. I also want different dealer groups, because each dealer will be registered into a particular group based on the % discount off the list price of the products they will recieve.

So to summarize, I need a Catalogue Mode of the HikaShop store for general registerd users. But I also need a working version of the store for the dealers to order products. Also, I need for each dealer to be assigned to a particular user group, and each group will be entitled to a specific discount off the list price. Can HikaShop accomplish this, and how would I go about configuring it?

Thank you,
Chris

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

  • Posts: 82818
  • Thank you received: 13364
  • MODERATOR
13 years 8 months ago #8555

Hi,

In order to do that, you will have to edit the file quantity of the view product via the menu Display->Views and change the line:
if(!$this->params->get('catalogue')){

to:
$user =& JFactory::getUser();
$allowedGroups=array(XX, YY);
if(hikashop::isAllowed($allowedGroups,$user->id)){

XX and YY being the ids of the joomla user groups for which you want to allow the purchase.

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

  • Posts: 292
  • Thank you received: 5
  • Hikashop Business
13 years 8 months ago #8592

Thanks.

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

  • Posts: 38
  • Thank you received: 0
13 years 8 months ago #8617

I think I got this working. Thank You!

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

  • Posts: 38
  • Thank you received: 0
12 years 4 months ago #56958

Hi Nicolas,

Is the provided solution in this thread still valid, or has there been updates to the HikaShop code? Please let me know, I need to implement this again.

Thank you,
Chris

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

  • Posts: 82818
  • Thank you received: 13364
  • MODERATOR
12 years 4 months ago #56960

Hi,

It's still the same.

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

  • Posts: 38
  • Thank you received: 0
12 years 4 months ago #56961

Hi,

I cannot find the line...
if(!$this->params->get('catalogue')){

I forgot to mention that I am runnning the Business edition.

Thank you

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

  • Posts: 82818
  • Thank you received: 13364
  • MODERATOR
12 years 4 months ago #56997

Mmm, I should stop answering at 4 am :)

You will have to change the line:
}elseif(!$this->params->get('catalogue') && ($this->config->get('display_add_to_cart_for_free_products') || !empty($this->row->prices))){

to:
}elseif(hikashop::isAllowed($allowedGroups,$user->id) && ($this->config->get('display_add_to_cart_for_free_products') || !empty($this->row->prices))){

and add the lines:
$user =& JFactory::getUser();
$allowedGroups=array(XX, YY);
after the first <?php tag because it changed a bit since one year ago.

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

  • Posts: 2
  • Thank you received: 0
12 years 2 months ago #64444

Im having trouble getting it to work. It appears to just hide the quantity and cart button so the site does NOT need to be in catalog mode for this to function i presume.

I switched out

}elseif(!$this->params->get('catalogue') && ($this->config->get('display_add_to_cart_for_free_products') || !empty($this->row->prices))){

with

}elseif(hikashop::isAllowed($allowedGroups,$user->id) && ($this->config->get('display_add_to_cart_for_free_products') || !empty($this->row->prices))){

and tried adding

$user =& JFactory::getUser();
$allowedGroups=array(8, 9);

in various places... after the first <?php at the very top of the file and throughout the file within <php></>. I also tried 08,09 for allowedgroups incase that was it. no system or template cache going on.
One weird thing i noticed is if i delete the entire productview-quantity content the site still functions the same... so that really seems like a cache thing?

Last edit: 12 years 2 months ago by covertlogic.

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

  • Posts: 2
  • Thank you received: 0
12 years 2 months ago #64449

hahaha. I think i was just in the wrong template. stupid stupid stupid >.<

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

Time to create page: 0.088 seconds
Powered by Kunena Forum