Loading

Prices on products only for registered customers.

7 posts / 0 new
Last post
Offline
Joined: 12/17/2011
Prices on products only for registered customers.

I wonder if it is to let the prices visible only for registered customers?

Sincerely,
Antonio Fragueiro

Offline
Joined: 10/12/2010

You can override the standard Price helper. Copy the library/Axis/View/Helper/Price.php to app/design/front/fallback/helpers/Price.php and change the price output according to your rules.

Add the following code to the top of price method.

if (!Axis::getCustomer()) {
    return '';
}

Offline
Joined: 12/17/2011

Good afternoon!

It worked well, but if the client is not registered click add to cart, and then click buy, the customer is not registered will be brought to the cart, the cart and there he can see the price, I needed the client without being registered can not see the price anywhere, even in the cart, is?

Sincerely,
Antonio Fragueiro

Offline
Joined: 10/12/2010

You can also rewrite the currency helper. Do it in the same way as you did with Price.php file.

But it's not a good idea. The right way for you is to reject adding the product to the cart by guests.

To do this you need to redefine the checkout/cart/add action with custom module.

Anonymous (not verified)

for the price, can we put "CALL" text instead the numeric "0" ?

Offline
Joined: 10/12/2010

Where did you get 0?

Just write the 'CALL' in currency and price helpers:

if (!Axis::getCustomer()) {
    return 'CALL';
}

Anonymous (not verified)

thanks Vova, it work just fine now