WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Bakery Shop »
  • Hide price to unregistered users
  • Print
Pages: [1]   Go Down

Author Topic: Hide price to unregistered users  (Read 7714 times)

premagraphic

  • Guest
Hide price to unregistered users
« on: July 09, 2010, 10:51:15 AM »
Hello, sorry for my bad english,
this module is really nice.
You can hide the price to unregistered users?
tanks.
Logged

snark

  • Guest
Hide price to unregistered users
« Reply #1 on: July 09, 2010, 06:06:44 PM »
Quote from: premagraphic on July 09, 2010, 10:51:15 AM
Hello, sorry for my bad english,
this module is really nice.
You can hide the price to unregistered users?
tanks.

https://forum.WebsiteBaker.org/index.php/topic,18542.0.html

the price will be viewable in de code of the page but if one doesn't know one doesn't search ...

change "[price]" to: "[[price_hide_start]][price][[price_hide_end]]"

problem then is that you will create an empty droplet's output for the price_hide_end droplet if the user is loggend in
so be sure to fill something in where I have put 'somethingbehindthep rice', a comma something like that should work

reason why I use to droplets is that the [price] tag used in bakery will not work if it is placed by the droplet



price_hide_start droplet:
Code: [Select]
global $database, $wb;
if ($wb->is_authenticated() ) {                   
return 'price: ';
}
else {
return '<!--';
}

the price_hide_end droplet:

Code: [Select]
global $database, $wb;
if ($wb->is_authenticated() ) {                   
return 'somethingbehindthepric';
}
else {
return '-->';
}



Logged

premagraphic

  • Guest
Hide price to unregistered users
« Reply #2 on: July 09, 2010, 08:05:20 PM »
Wonderful!
Can be reused anywhere?
I've solved a big problem. I understand the power of the droplets.
Thanks
Logged

snark

  • Guest
Hide price to unregistered users
« Reply #3 on: July 10, 2010, 09:11:02 AM »
with these droplets and variations of these droplets you can comment out anything for logged in or not logged in visitors

the link I placed shows the same thing used to show the total amount of downloads from the downloadmodule only to logged in users.

I have also used it to hide a complete section on a page
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Bakery Shop »
  • Hide price to unregistered users
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2