Hi,
I am trying to work out how to code my entire site so that the user can only see prices once logged in (once I have granted them a log in). It is a wholesale business so I don’t want the general public to be able to see the prices for obvious reasons.
Can you help me with a code?
Also not sure how I get it to recognise price as an element.
https://support.wix.com/en/article/hiding-the-price-of-a-product-in-wix-stores
Hide the prices on your existing Wix Stores product pages.
https://support.wix.com/en/article/request-selling-products-in-bulk-wholesale-in-wix-stores
Setup a wholesale Wix Stores and change your permissions so only wholesalers who have been approved can log in to the wholesale store.
https://support.wix.com/en/article/changing-the-permissions-of-a-wix-stores-page
Price element from Product collection.
https://support.wix.com/en/article/corvid-wix-stores-product-collection-fields#price-price
Thanks for your help but looks like I will have to use a different website provider.
I don’t want to hide the prices completely, just if they aren’t logged in and does not look like I can do this without coding which I have tried but it doesn’t recognise the price as an element.
I know lots of people have been asking the same question. Could Wix look at implementing this so its an option rather than having to try and use coding … which I can’t do.
Then try just doing it a simple way and put something like this in your Wix Stores page code.
$w.onReady( () => {
if(wixUsers.currentUser.loggedIn) {
$w("#price").show();
}
else {
$w("#price").hide();
Velo: Wix Stores "Products" Collection Fields | Help Center | Wix.com
HiddenMixin - Velo API Reference - Wix.com
Have tried this and it doesn’t recognise price as an element and comes up with red errors.
Is this did not closed?
I also need the solution for the same.
Any geeks please give us your hand
Hi, I am looking for the same solution. Could someone pls help out?
I managed to show price only if logged in. However I have a
p roblem with correct next/previous product price display.
On the product detail page the price won’t change or update. It will load initially with the correct price but won’t update correctly once the user clicks on next or previous product. The field #text49 needs to be updated, but I don’t know how…
This is the code I use on the product detail page - which still works but only partially.
import wixUsers from ‘wix-users’ ;
$w . onReady ( function () {
if (! wixUsers . currentUser . loggedIn ){
$w ( “#text49” ). hide (); // content hidden if you’re not logged in
} else {
$w ( "#text50" ). hide (); // content visible if you're logged in
$w ( "#text49" ). show (); // content visible if you're logged in
}
});
I need still some function to make the field being updated once the product has changed by clicking the next or previous button .
Could someone please help out?
It looks like your setup is correct. Would you mind to post one of your product url here?
This is a product page url:
Please note, to see the price field you need to log in.
Thank you for your support!
This is a product page url:
Please note, to see the price field you need to log in.
Thank you for your support!
Still not working for me. I am using this with a template. Is there any way to do this?