PrestaShop Forum

The best place in the world to ask questions about PrestaShop and get advice from our passionate community!

PrestaShop Forum

Jump to content

Hide prices for users not registered in Prestashop 1.4

19 replies to this topic
#1
Nilton Cesar

    PrestaShop Newbie

  • Members
  • Pip
  • 0 posts
I'm using version 1.4 of Prestashop, and need to hide the price for non-registered users.
I found several solutions here in the forum, but for previous versions.
Can anyone help me please.
Thank you in advance


#2
nwcic

    PrestaShop Newbie

  • Members
  • Pip
  • 11 posts
Tryng to do this also. What template needs to be edited? Also do you know where in that template?
Thank you ahead of time.

#3
nwcic

    PrestaShop Newbie

  • Members
  • Pip
  • 11 posts
Still hoping to find a solution to this. Anyone watching this thread?

#4
kuipje

    PrestaShop Newbie

  • Members
  • Pip
  • 12 posts
Hi there,

I already got a shop with this feature.

Edit the file classes\FrontController.php

find
'PS_CATALOG_MODE' => (bool)Configuration::get('PS_CATALOG_MODE')

replace with
//'PS_CATALOG_MODE' => (bool)Configuration::get('PS_CATALOG_MODE')


find
$this->iso = $iso;
$this->setMedia();

insert next code right after
if (isset($cookie)) {
$result = Db::getInstance()->getValue('SELECT max(id_group) FROM '._DB_PREFIX_.'customer_group WHERE id_customer = '.(int)self::$cookie->id_customer);
$idgroup = $result; }
if ($idgroup > 0)
{$catalog_mode = false;}
else
{$catalog_mode = true;}
$smarty->assign(array('PS_CATALOG_MODE' => $catalog_mode));


then download and instal the module customerreigtration v2.0 that works great with version 1.40- 1.4.2.5

When you pm me, i wil sent the frontcontroller.php to you.

Good luck, Kuipje
Veni, vidi, usum Prestashop

------------------------------------------------------------------------------------------------
Shops made by me:
- http://www.beebiekleding.nl
- http://www.dedeshop.nl
- http://www.Prestaworld.nl
- next
- and next
-

#5
kuipje

    PrestaShop Newbie

  • Members
  • Pip
  • 12 posts
Thx Angora for pointing me @ the override directory. that was one of the things i loved with magento templates.
I will see into it, the override directory wil make upgrades in the future much easier.

Kuipje
Veni, vidi, usum Prestashop

------------------------------------------------------------------------------------------------
Shops made by me:
- http://www.beebiekleding.nl
- http://www.dedeshop.nl
- http://www.Prestaworld.nl
- next
- and next
-

#6
Seetharam

    PrestaShop Newbie

  • Members
  • Pip
  • 9 posts
I have an eShop with Prestashop 1.4.0.17, I used to face an issue where customer would create carts but not checkout, I would see these carts being created in the BO -> Customers -> Shopping Carts, I wanted to understand more why these carts were getting abandoned so i implemented the solution from "Beginner", which works brilliantly in hiding prices and add to cart buttons unless a person registers or logs in. So even if a cart gets abandoned i know who created those carts and i can contact them to see what the issue was.

Now the problem is i still see carts being created but i dont see the customer details of who created the carts, If i have made it not possible to create carts without creating a account how are these "ghost" carts still being created

Any help in this regards would be really helpful, Thanks in advance.

#7
MMVV

    PrestaShop Newbie

  • Members
  • Pip
  • 2 posts
Hi! I cannot fine FrontControl. It is not in classes. Is there another solution??

#8
cth7687

    PrestaShop Newbie

  • Members
  • Pip
  • 18 posts
well, code still works, but "customerreigtration v2.0" is not working for 1.4.4.1 final. just let you guyz know.
Because of "customerreigtration v2.0", now my whole categories is gone and not working even though I reset every thing.
I should not test this 1.4.2 module.

#9
MarioCCH

    PrestaShop Newbie

  • Members
  • Pip
  • 1 posts

View Postcth7687, on 26 August 2011 - 05:45 PM, said:

well, code still works, but "customerreigtration v2.0" is not working for 1.4.4.1 final. just let you guyz know.
Because of "customerreigtration v2.0", now my whole categories is gone and not working even though I reset every thing.
I should not test this 1.4.2 module.


hello quys - any news about this solution ??

#10
Mstyle

    PrestaShop Apprentice

  • Members
  • PipPip
  • 39 posts
Hi. Why not try this module?

Private Shop

http://www.presto-ch...tm_medium=email

#11
Avi B

    PrestaShop Newbie

  • Members
  • Pip
  • 3 posts
Hi Everybody and especially to kuipje

Thanks for the code to hide the prices from non-registered users
i tried it out on my site and it worked beautiful but when i tried to replaced back to normal with my backed up FrontController.php file i was unable to do it
Can anyone help me get my site back to normal?

Thanks Everybody

My Site Is

http://a2zmarketplac...rimmed-yarmulka

#12
loulou66

    PrestaShop Apprentice

  • Members
  • PipPip
  • 165 posts
hello

if you speak french i see this a post

http://www.prestasho...s-non-inscrits/

else donload the attachement file

it's the traduction whith google translate

for hide the price for non user you must search in product.tpl and product-list.tpl of your theme

the declaration of display price and put {if $logged} before and {/if} after

i hope that help you

Attached File  hide price non inscrit-EN.txt   3.75K   82 downloads

@++ Loulou66
Pour marquer un topic comme [Résolu]
- Editer le premier post du topic en cliquant sur le bouton"Editer",
- Cliquer sur le bouton "Utiliser l'éditeur complet",
- Ajouter la mention "[Résolu]"; au début du titre de votre topic et cliquez sur le bouton "Envoyer le message modifé"

#13
Avi B

    PrestaShop Newbie

  • Members
  • Pip
  • 3 posts
Thanks Loulou for your reply!

Don't worry about your English its not bad :-)

I looked over your file already i will try to work around with it, but as of now i have to restore my website to normal in order to try this solution
i have followed the steps from the post what has bin posted on 07 June 2011 - 12:25 PM By kuipje and now there is no way how to get back my items live and i don't know how to restore my site to normal view, i'm just getting the following error

There is 1 error :
  • You do not have access to this product.
how can i get my items back to live?

who can help me?

#14
kuipje

    PrestaShop Newbie

  • Members
  • Pip
  • 12 posts
Hi Avi B,

what is youre current version of prestashop?
Did you use the customerreigtration v2.0?
have you set Force compile to yes and cache set no in the performance tab?

The code is quite simple and doesn't change the database at all.

I made the code for a back to business site bud on request of the owner it did not got further developed.

Kuipje
Veni, vidi, usum Prestashop

------------------------------------------------------------------------------------------------
Shops made by me:
- http://www.beebiekleding.nl
- http://www.dedeshop.nl
- http://www.Prestaworld.nl
- next
- and next
-

#15
loulou66

    PrestaShop Apprentice

  • Members
  • PipPip
  • 165 posts
Hi Avi B

if you have changed only the files classes\FrontController.php

re-upload the original file you can find all version of Ps


here ==> http://code.google.c.../downloads/list

@++ loulou66
Pour marquer un topic comme [Résolu]
- Editer le premier post du topic en cliquant sur le bouton"Editer",
- Cliquer sur le bouton "Utiliser l'éditeur complet",
- Ajouter la mention "[Résolu]"; au début du titre de votre topic et cliquez sur le bouton "Envoyer le message modifé"

#16
Avi B

    PrestaShop Newbie

  • Members
  • Pip
  • 3 posts

Thanks Kuipje for your instructions, i have changed my settings in the performance and i have reset the groups to default in the Back OfficePosted ImageCustomersPosted ImageGroups tab,

performance now everything is back to normal!


Thanks again


BTW my prestashop version is 1.4.6.2 and i have used the customerreigtration v2.0.

can i chenge my chach settings back to yes, will it make my site load faster, and what was the resin for asking me to set it to NO?


​sorry for asking this questions i'm a newbie here.


Thanks Loulou for your advise i will try your solution to hide prices i hope it will work well.



#17
kuipje

    PrestaShop Newbie

  • Members
  • Pip
  • 12 posts
Hi Avi B,

Merry Christmas :)

Great that is works again. Reason to set it to no is experience by working with prestashop.
Be careful with custumer registration 2.0, I've read in this treat that this can cause problems.

Please set the performance tab back to the old settings:
Force compile to no and cache set yes.

Good luck with youre store.


@loulou66, tthx for you're support.

Kuipje,
Veni, vidi, usum Prestashop

------------------------------------------------------------------------------------------------
Shops made by me:
- http://www.beebiekleding.nl
- http://www.dedeshop.nl
- http://www.Prestaworld.nl
- next
- and next
-

#18
loulou66

    PrestaShop Apprentice

  • Members
  • PipPip
  • 165 posts
Hi all

Merry Christmas :)

Loulou66
Pour marquer un topic comme [Résolu]
- Editer le premier post du topic en cliquant sur le bouton"Editer",
- Cliquer sur le bouton "Utiliser l'éditeur complet",
- Ajouter la mention "[Résolu]"; au début du titre de votre topic et cliquez sur le bouton "Envoyer le message modifé"

#19
MackStores.Com

    PrestaShop Newbie

  • Members
  • Pip
  • 20 posts
go to any tpl file
{if logged}
(inhere should be any price showing lines)
{if}

Mack Stores

Www.MackStores.com


#20
elpatron

    PrestaShop Addict

  • Members
  • PipPipPip
  • 770 posts
We have two different modules to accomplish this. We do not recommend anyone modifying using if/eif logic solution where price is displayed. You end up with a highly modified site that will be hard to upgrade and will require more modifications as you load new modules/themes etc. that deal with price. Also this model does not take into account hiding your cart, your currency block, etc. etc.

Our solutions are SMALL FOOT PRINT!

Registered Clients Only (i.e. registered and logged in)
four(4) lines of code. one program patch

Authorized Client Only (i.e. approved clients who are logged in)
six(6) lines of code in two programs.

Modules built on prescribed PrestaShop best module practices.
Compatible with all 1.4 systems.