[SOLVED] Restrict display pricing/add-to-cart butt

  • Posts: 332
  • Thank you received: 6
11 years 10 months ago #131241

This is a general question and not for a specific website.

Is there a way with the HikaShop to restrict the display of pricing and add-to-cart button's to only registered users? I have a site that we are doing that now with PayPal Add-to-Cart buttons and a plug-in that allows us to only display a part of the article (which has pricing and buttons) to registered users.

Also, is there a way to have multi-level customers with different pricing? I have another site that needs the ability to have one price for regular customers (Registered User Group) but wants a discounted price for members (Members User Group).

Thanks.

Last edit: 11 years 9 months ago by LukeDouglas.

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

  • Posts: 13201
  • Thank you received: 2322
11 years 10 months ago #131254

Hi,

In the product edition pages, you can set a different price depending on the user groups.
If you set a price of 0€ for the public group and disable the option "display add to cart button for free products" so the add to cart button will be hidden for guest users and the text "free" will be displayed.
You can do a translation override to replace the text "free" by nothing or something else.

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

  • Posts: 25
  • Thank you received: 1
9 years 7 months ago #229337

Hi

The above instructions are hiding price and Add to cart button.
Is there any way to Show the price but hide the Add to cart button (until login), saying to customers that they have to login or register to make a purchase?

Thank you

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

  • Posts: 332
  • Thank you received: 6
9 years 7 months ago #229474

nojunkgoodfood,

You should be able to do this via CSS. Add this to your custom css sheet.

/* remove price and button for product display */
.hikashop_product_price_full,
.hikashop_product form,
.hikashop_product_quantity_main {display:none;}

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

  • Posts: 12953
  • Thank you received: 1778
9 years 7 months ago #229346

Hello,
The solution can be to directly add the price through the description of your product, you'll directly have to edit the code of the "show_default" file of the "product" view via "Hikahop->Display->Views" and add a condition to these lines regarding the user group that your customer is in :

<?php
//LAYOUT quantity
$this->row = & $this->element;
$this->ajax = 'if(hikashopCheckChangeForm(\'item\',\'hikashop_product_form\')){ return hikashopModifyQuantity(\'' . $this->row->product_id . '\',field,1' . $form . ',\'cart\'); } else { return false; }';
$this->setLayout('quantity');
echo $this->loadTemplate();
?>

The following user(s) said Thank You: nojunkgoodfood

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

Time to create page: 0.091 seconds
Powered by Kunena Forum