
01-27-2012, 06:01 PM
|
 |
Junior Member
|
|
Join Date: Jan 2012
Posts: 1
|
|
Show prices for registered user only.
I need to show prices for registered users only, this is a must for my client, since i can not find a solution for this requirement i can not use ecwid, it's a shame!
|

01-31-2012, 10:19 AM
|
 |
Ecwid Team
|
|
Join Date: Oct 2011
Posts: 3,116
|
|
Quote:
Originally Posted by Joe Leal
I need to show prices for registered users only, this is a must for my client, since i can not find a solution for this requirement i can not use ecwid, it's a shame!
|
Hello,
Unfortunately, Ecwid doesn't currently have a built-in feature for hiding the prices for non-registered visitors in the storefront. However, there is a related suggestion in our ideas base. Please vote for it to get it implemented in Ecwid sooner:
http://ideas.ecwid.com/forums/22031-...
In the meantime you can consider a workaround. As you probably know, there is a way to hide product prices in a store at all (by modification of your custom CSS theme):
http://kb.ecwid.com/w/page/21851989/...
Since it should depend on whether a visitor is logged in or not, that CSS mod should be enabled or disabled dynamically. In order to do it you will need to make a slight JavaScript code, which will check a customer profile (it can be done by means of the Ecwid JS API). The exact way to implement it depends on:
- how you will manage your customers and give an ability to register in your store. The registration in Ecwid store is free for all customers, however, you can make an external registration with the help of the Single Sign On API so all registered users will need your approval.
- how you will integrate your store on your site. Ecwid widgets and a way how they can be integrated into existing websites give merchants an ability to set up the online store in many different ways so the site HTML structure can be different.
- whether the bag widget should be displayed when the prices are hidden or not.
- etc.
Could you explain how exactly it should look so I will suggest you a more suitable solution?
|

04-18-2012, 04:40 PM
|
 |
Junior Member
|
|
Join Date: Apr 2012
Posts: 3
|
|
Hi guys...
I'm having the same problem here. I have Ecwid integrated with wordpress, and i want to show price only to the logged in users. Is there a way to do this? I want the client to register through a custom registration form in wordpress, and the price would show if they're logged in wordpress.
I'm not really good at php, but i can understand html and css just fine. How can i do this?
|

04-19-2012, 02:40 PM
|
 |
Junior Member
|
|
Join Date: Apr 2012
Posts: 3
|
|
Anyone guys?! i really need some help here. I'm about to close this website, this is the only thing that i need now.
|

04-19-2012, 07:04 PM
|
 |
Ecwid Team
|
|
Join Date: Oct 2011
Posts: 3,116
|
|
Quote:
Originally Posted by marinalucio
Hi guys...
I'm having the same problem here. I have Ecwid integrated with wordpress, and i want to show price only to the logged in users. Is there a way to do this? I want the client to register through a custom registration form in wordpress, and the price would show if they're logged in wordpress.
I'm not really good at php, but i can understand html and css just fine. How can i do this?
|
Hello,
In my previous message, I explained how to hide prices and add to bag buttons in Ecwid (in general):
Quote:
As you probably know, there is a way to hide product prices in a store at all (by modification of your custom CSS theme):
http://kb.ecwid.com/w/page/21851989/...
Since it should depend on whether a visitor is logged in or not, that CSS mod should be enabled or disabled dynamically.
|
If my understanding is correct, you want to check if a visitor is logged in to WP and show/hide prices accordingly. Here is how you can do it:
1. In the "header.php" file of your current WP theme, check whether a user is logged in or not.
As far as I know, there is a function in WP for such purposes. You can consider using it. Please refer to this document:
http://codex.wordpress.org/Function_...
2. If a user is not logged in, add some special CSS class to the <body> tag so that it will look like this:
<body class="my-special-class">
3. Add CSS rules to your custom CSS theme that will hide prices when the 'my-special-class' is set. Such a rule could look like this:
Code:
.my-special-class div.ecwid-productBrowser-price {
display: none;
}
If you need help with creating of such a mod, please feel free to contact our friends from Qualiteam: sales@qtmsoft.com . They will be glad to help.
Last edited by Makfruit; 04-20-2012 at 08:45 AM.
|

04-19-2012, 08:08 PM
|
 |
Junior Member
|
|
Join Date: Apr 2012
Posts: 3
|
|
Ok Makfruit,
Thank you for your reply. Let me see if i'm doing this right. I'm using the mercado theme btw.
I'll go to the header.php file, and add the
Quote:
<?php
if ( is_user_logged_in() ) {
} else {
<body class="my-special-class">
}
?>
|
code anywhere on the page?
I did the custom css already. But i'm doing it this way and it's not working. What i'm doing wrong here?
|

04-20-2012, 11:55 AM
|
 |
Ecwid Team
|
|
Join Date: Oct 2011
Posts: 3,116
|
|
Quote:
Originally Posted by marinalucio
Ok Makfruit,
Thank you for your reply. Let me see if i'm doing this right. I'm using the mercado theme btw.
I'll go to the header.php file, and add the
code anywhere on the page?
I did the custom css already. But i'm doing it this way and it's not working. What i'm doing wrong here?
|
This way, you're creating another <body> tag on the page that already has one. It's not correct. You will need to add a CSS class to the existing body element instead of replacing the element or adding another one. In order to do it, find the place in code where the body tag is located and add a custom code there so that a special CSS class will be appended when an user is not logged in.
It's a bit difficult to recommend the exact way of integration such a mod and the exact code as it depends on many things: theme functions and styles, the site structure and layout - they all may be different for each WP installation. So I'd recommend you to hire a developer to make the changes for you.
|

03-24-2013, 11:57 PM
|
 |
Junior Member
|
|
Join Date: Mar 2013
Posts: 1
|
|
members only pricies
Is it possible to have prices only show to logged in users. We are wholesale shop and would like for the public to see our products but only give prices and purchase options to logged in members.
It this possible?
Thanks in advance for any advise!
|

03-25-2013, 12:54 PM
|
 |
Ecwid Team
|
|
Join Date: Jan 2013
Posts: 459
|
|
Quote:
Originally Posted by Mike scheid
Is it possible to have prices only show to logged in users. We are wholesale shop and would like for the public to see our products but only give prices and purchase options to logged in members.
It this possible?
Thanks in advance for any advise!
|
Please, refer to this post: http://www.ecwid.com/forums/showthre...
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT. The time now is 12:29 AM.
Powered by vBulletin® Version 3.8.6. Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
|