| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
hide the Price until customers login. | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Hello, I have hunted high & low & have really only found out dated info.
**please help** I have been reading and searching for hours. I need to hide the Price until customers login. Please advise were to place the code below in product.tpl & products.tpl Even better a copy & paste of the whole .tpl files would speed things up for future members. THANK YOU IN ADVANCE FOR YOUR HELP.. Still Learning this is from the Sticky ************************************************** ** 9. Ah, one more before I hit the bed - ever wanted to display something based on whether a customer was not only logged in, but whether or not they had a "membership level" as well? The "if logged in" part is easy: Code: {if $login ne ""} display this {/if}
The above tag will display the "display this" text if a person has logged in. If they have not, it will display nothing. Now, determining whether they have a membership level is a different tag: Code: {if $user_membership ne ""} display this {/if}
The above tag will only display the text if a membership level is detected by x-cart. Useful if you have "member-only" pages or messages. I have used this in the past to surround pricing tags in product.tpl and products.tpl, as well as for displaying navigation tabs, etc. It is also useful for displaying a message such as "become a member for extra savings, click here" if you want non-members to feel like they should check out becoming a member of your store when they are looking at products. Another useful place for this tag is on your static pages - many people have complained of not having "content protection" on x-cart - well, this is how you do it. Create your static page, make sure you have "parse smarty tags in static pages" checked in your general setting for static pages, and then at the top of your html where your content begins, simply put that tag in there surrounding your "real" content, and then an {else} for your message to people who don't have the membership. Something like this: Code: {if $user_membership ne "Level 1"}I'm sorry, you don't have a membership, so this content is not accessible. Please click here to become a member and get the goodies.{else}Your real html content{/if}
__________________
my new xcart 5 link is here https://www.tropitek.net/xcart/ my old xcart 4 link is here http://www.tropitek.net/wholesale/home.php X-Cart Pro version 4.7.? PHP 5.6 MySQL client 5.1.63 Operation system Linux |
|||||||
#2
|
|||||||
|
|||||||
![]() By the amount of views and no answers, i guess this is a question worth getting an answer PRO's
thanks again Paul
__________________
my new xcart 5 link is here https://www.tropitek.net/xcart/ my old xcart 4 link is here http://www.tropitek.net/wholesale/home.php X-Cart Pro version 4.7.? PHP 5.6 MySQL client 5.1.63 Operation system Linux |
|||||||
#3
|
|||||||
|
|||||||
![]() Paul,
You posted your own answer. Quote:
The inverse is Quote:
Find where the price is displayed in your template. Before the price display, put something like this in (you will have to fight the tables and divs): Quote:
And of course, wrap this around the price code: Quote:
This is a relatively easy smarty hack, and a good way to dive in and learn some basic smarty. Please report back once you have mastered this.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#4
|
|||||||
|
|||||||
![]() Played around with this tooo long,
will pay to get is done. any pro's can quote me please.
__________________
my new xcart 5 link is here https://www.tropitek.net/xcart/ my old xcart 4 link is here http://www.tropitek.net/wholesale/home.php X-Cart Pro version 4.7.? PHP 5.6 MySQL client 5.1.63 Operation system Linux |
|||||||
#5
|
|||||||
|
|||||||
![]() save your money and figure it our for yourself. Believe me
![]() ![]() Try to upgrade this working code for 3.5.14 to 4.1.9. I using this code in my 3.5.14 Code:
Play around with something like this: Code:
__________________
X-Cart Gold Version 3.5.14 (Live) X-Cart Gold Version 4.1.10 (in dev) Modification for 4.1.10 Run with 1 License, 1 Database up to 5 Shops with different domains, config, categories and more. click here for informations |
|||||||
#6
|
|||||||
|
|||||||
![]() I too am working on the syntax for this. If the general public or prospective customer comes to our site, I only want them to see 'Please call for pricing'. Only a customer assigned to a membership level will see their pricing.
I've found one instance so far in the customer/main/products.tpl file to change lbl_our_price where I want the customer to see 'Your Price' and the other lbl_enter_your_price to be 'Please call for pricing'. Any suggestions here would be greatly appreciated.
__________________
______________ version 4.1.9 Gold |
|||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|