Hide the price on the storefront
Hi,
I would like to hide the price of my products on my website and only show the price once the customers have logged in, Does anyone have any idea how to do it? Thank you |
Re: Hide the price on the storefront
You posted in XC5 forum but signature says XC4 - so which one is it? Either way though it will require custom coding for this work. If it is for XC4 you can find some tips here on the forum.
|
Re: Hide the price on the storefront
Quote:
|
Re: Hide the price on the storefront
You will need to write a mod for this task. If you are ready, I can help.
As a first step, please create an empty module according to the guide here: http://kb.x-cart.com/display/XDD/Step+1+-+creating+simplest+module |
Re: Hide the price on the storefront
Hello,
I'd also be interested in this. I already have created a module. Thank you! |
Re: Hide the price on the storefront
Look at the code used for the account links. It shows one list when logged in, another when not. So the effect you want should be easily achieved by following that example, overriding the template file with your module and adding the conditional IF statement.
|
Re: Hide the price on the storefront
Hello Mike,
thank you for your answer. Unfortunately I'm not overly familiar with X-cart yet, could you point me which files exactly I should modify with a module? Thanks again, |
Re: Hide the price on the storefront
Ok, so here is the Flexy code that checks if a user is logged in:
Code:
<ul class="account-links" IF="isLogged()"> I would probably overwrite: default/en/common/price_plain.tpl I haven't tested this but you could try wrapping it in a div like this: Code:
<div IF="isLogged()"> |
Re: Hide the price on the storefront
Thanks Mike, your solution seems to work. For the record, here's what I've done.
Using CustomSkin, I've created the file \xcart\skins\custom_skin\default\en\common\price_p lain.tpl containing the following code : Quote:
After activating CustomSkin, the prices only show up when signed in. Thanks again for the help! |
Re: Hide the price on the storefront
Hi Mike,
I have added in theme_tweaker/default/en/common/price_parts/price.tpl the following: <div IF="isLogged()"> <li><span class="price product-price">{formatPrice(getListPrice(),null,1):h}</span></li> </div> This is good but basically as soon as someone hits "Register" and enter an email address (fake or not) and a password he/she is logged in. What statement could we add to have prices showing up ONLY when registrant as been approved, for example, as a wholesaler after a "pending" request? Thank you for your help. Philippe Setting up XCart 5.2.6 |
All times are GMT -8. The time now is 09:01 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.