Zen Cart Logo
Forums / General Questions / How to make Register beside PRICE in Product page?

How to make Register beside PRICE in Product page?

Views: 459

Results 1 to 5 of 5
28 Jun 2011, 10:40 AM
#1
alhakeem2001 avatar

alhakeem2001

Zen Follower

Join Date:
Nov 2007
Posts:
434
Plugin Contributions:
1

How to make Register beside PRICE in Product page?

here is what I want to display in product page,
If the client haven't login their account, request them to register or Login.
it will show as below:

I don't know how to make it happen. Also if this can be in the core would be very nice.

Anyone who can help? Thanks!

28 Jun 2011, 11:11 AM
#2
alhakeem2001 avatar

alhakeem2001

Zen Follower

Join Date:
Nov 2007
Posts:
434
Plugin Contributions:
1

Re: How to make Register beside PRICE in Product page?

What I want is when the client doesn't login, show [Login] [Register] instead of price. Once client logged in show the price only. do we have that option in Zencart ?

28 Jun 2011, 1:21 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: How to make Register beside PRICE in Product page?

Did you peek at the settings in the Configuration ... Customer Details ...

Customer Shop Status - View Shop and Prices
Customer must be approved to shop
0= Not required
1= Must login to browse
2= May browse but no prices unless logged in
3= Showroom Only

30 Jun 2011, 12:09 PM
#4
alhakeem2001 avatar

alhakeem2001

Zen Follower

Join Date:
Nov 2007
Posts:
434
Plugin Contributions:
1

Re: How to make Register beside PRICE in Product page?

OK, I think I didn't explained it clearly ! as I meant the same layout like the image above ..

Price: [Login][Register]
Availability: In Stock ....etc

30 Jun 2011, 12:47 PM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: How to make Register beside PRICE in Product page?

Currently, the function zen_get_products_display_price controls the Price display and the function zen_get_buy_now_button handles the buy now/add to cart ...

You could customize either the functions or the tpl_product_display_info.php template using your templates and overrides to control what is displayed based on the current:
$_SESSION['customer_id']

when that is the value of 0, then the customer is not logged in ...