Hi, I am looking for the same solution. Could someone please help out?
I managed to show price only if logged in.
However I have a prooblem with the correct item display. As it shows the price of the first item on the dataset, without taking reference to the current product.
On the product detail page the price won't change or update. It will load initially with a price (the first on the dataset) but won't update correctly once the user clicks on next or previous product or page is refreshed. 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
}
});
Here your find an example: https://moises363.wixsite.com/gourmetgonzalez/product-page/concejo-reserva-18-mt-barrique-2016-75cl
Could someone please help out?