Jump to content

Hide prices in whole eshop but keep add to cart


Recommended Posts

Hi all. I have spent all day to find a solution how to hide prices but keep the option to add product to cart. I need small eshop, a customer can not see prices but he can add some products to the cart and send order to admin. And then admin will send him back some offer including prices. Thanks for advice

Link to comment
Share on other sites

Hello

 

Using PS 1.6.0.9 default theme

 

You can try adding this to the bottom of global.css

 

.price {display:none!important;}
.price.product-price { display:none!important;}
.old-price { display:none!important;}
.old-price.product-price { display:none!important;}
.special-price { display:none!important;}
.price-percent-reduction { display:none!important;}
.price-percent-reduction.small { display:none!important;}
.our_price_display { display:none!important;}
 
I would take a careful check of your site afterwards to make sure you haven't hidden too many prices
 
Paul
Link to comment
Share on other sites

Another option is to enable native Prestashop 'catalog mode'.  For displaying the add to cart then you nulify the 'catalog mode' check in product.tpl for example.  Then remove the check in cart module to remove 'catalog mode' check.  As PS is designed to work in 'catalog mode' already using this and making just a couple changes will take care of things like special's best seller etc. type modules, which will display but not with price when in 'catalog mode'.

 

back office-->preferences-->products to enable catalog mode.  Note: when enable/disable you will need to clear cache to see correct results on your ps.

 

example code to find and comment out in blockcart/blockcart.php

	public function hookRightColumn($params)
	{
//		if (Configuration::get('PS_CATALOG_MODE'))
//			return;

example code to find and remove catalog mode check in themes/yourtheme/product.tpl

						<div{if (!$allow_oosp && $product->quantity <= 0) || !$product->available_for_order || (isset($restricted_country_mode) && $restricted_country_mode) || $PS_CATALOG_MODE} class="unvisible"{/if}>
							<p id="add_to_cart" class="buttons_bottom_block no-print">
								<button type="submit" name="Submit" class="exclusive">
									<span>{if $content_only && (isset($product->customization_required) && $product->customization_required)}{l s='Customize'}{else}{l s='Add to cart'}{/if}</span>
								</button>
							</p>
						</div>
//NOW WE REMOVE THE CATALOG MODE CHECK TO DISPLAY THE ADD TO CART 
					<div class="box-cart-bottom">
						<div{if (!$allow_oosp && $product->quantity <= 0) || !$product->available_for_order || (isset($restricted_country_mode) && $restricted_country_mode)} class="unvisible"{/if}>
							<p id="add_to_cart" class="buttons_bottom_block no-print">
								<button type="submit" name="Submit" class="exclusive">
									<span>{if $content_only && (isset($product->customization_required) && $product->customization_required)}{l s='Customize'}{else}{l s='Add to cart'}{/if}</span>
								</button>
							</p>
						</div>
						{if isset($HOOK_PRODUCT_ACTIONS) && $HOOK_PRODUCT_ACTIONS}{$HOOK_PRODUCT_ACTIONS}{/if}
					</div> <!-- end box-cart-bottom -->

  • Like 1
Link to comment
Share on other sites

Many thanks to you both. I have used first advice and it works almost everywhere. I have tried to create testing order. All prices are hidden but if I put a product into the cart, some small "preview" window will open and there I can see price. And the last place what I have found is in pdf order which eshop sends to customers. Can you give me some advice what else should I change, pls. Thanks

Link to comment
Share on other sites

  • 1 year later...

 

Another option is to enable native Prestashop 'catalog mode'.  For displaying the add to cart then you nulify the 'catalog mode' check in product.tpl for example.  Then remove the check in cart module to remove 'catalog mode' check.  As PS is designed to work in 'catalog mode' already using this and making just a couple changes will take care of things like special's best seller etc. type modules, which will display but not with price when in 'catalog mode'.

 

back office-->preferences-->products to enable catalog mode.  Note: when enable/disable you will need to clear cache to see correct results on your ps.

 

example code to find and comment out in blockcart/blockcart.php

	public function hookRightColumn($params)
	{
//		if (Configuration::get('PS_CATALOG_MODE'))
//			return;

example code to find and remove catalog mode check in themes/yourtheme/product.tpl

						<div{if (!$allow_oosp && $product->quantity <= 0) || !$product->available_for_order || (isset($restricted_country_mode) && $restricted_country_mode) || $PS_CATALOG_MODE} class="unvisible"{/if}>
							<p id="add_to_cart" class="buttons_bottom_block no-print">
								<button type="submit" name="Submit" class="exclusive">
									<span>{if $content_only && (isset($product->customization_required) && $product->customization_required)}{l s='Customize'}{else}{l s='Add to cart'}{/if}</span>
								</button>
							</p>
						</div>
//NOW WE REMOVE THE CATALOG MODE CHECK TO DISPLAY THE ADD TO CART 
					<div class="box-cart-bottom">
						<div{if (!$allow_oosp && $product->quantity <= 0) || !$product->available_for_order || (isset($restricted_country_mode) && $restricted_country_mode)} class="unvisible"{/if}>
							<p id="add_to_cart" class="buttons_bottom_block no-print">
								<button type="submit" name="Submit" class="exclusive">
									<span>{if $content_only && (isset($product->customization_required) && $product->customization_required)}{l s='Customize'}{else}{l s='Add to cart'}{/if}</span>
								</button>
							</p>
						</div>
						{if isset($HOOK_PRODUCT_ACTIONS) && $HOOK_PRODUCT_ACTIONS}{$HOOK_PRODUCT_ACTIONS}{/if}
					</div> <!-- end box-cart-bottom -->

Hi,

 

Can you tell me how to remove "catalog mode" in more details..there are over 30 catalogue mode in product.tpl.  Do I remove something like "|| $PS_CATALOG_MODE" in the code?  Thanks.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...