How to remove price column to non logged in/registered customers
I have been shown how to remove the sign in to view price text using the languages thing.
So far so good. I have removed the price until logged in. There is still the price column but it's now blank. How can I remove that column until you are signed in…?
In your skin folder at the bottom of your styles.css stylesheet add the following:
.add-product .wrapped {
display: none;
}
That will hide it and collapse the box.
Hi thanks for the help. Looks like it did not work for me. I must be doing something wrong…
I added that to the file here: public_html/cscart/skins/basic/customer/styles.css
I added to the end of the code here (there is like 1400 lines of code so I just copied the last few) is this the right code I should be adding it to?
Peter
Is your site online so that I can take a look?
Ok so I just stumbled upon how to fix this while doing some other things tonight and thought I would share.
How to turn off columns in the COMPACT LIST product listing layout:
Open /skins/YOUR SKIN/customer/blocks/product_list_templates/short_list.tpl you should see this:
{include file="blocks/list_templates/compact_list.tpl"
show_name=true
show_sku=true
show_price=true
show_add_to_cart=$show_add_to_cart|default:true
but_role="act"
hide_form=true}
In this case you will change “show price=true” to “false”. Save and upload.
Now if you look at your site you will see the words “price” are still showing up but the column isn't. Now you need to open: /skins/YOUR SKIN/customer/blocks/list_templates/compact_list.tpl.
Find on around line 22:
```php
```
Change to:
```php
{$lang.price}
```
Save and upload. You should see changes immediately. If not try clearing the cart cache.
Okay I got the word “price” to disappear, but I can't seem to get rid of that column though. Well there seems to be 2 columns left there about 1/4" wide each.
To clean the cache I just added ?cc to my main url, is that correct?
Peter
Yes to clear the cs-cart cache you append ?cc to the end of the URL to your admin area. “http://www.demo.com/admin.php?cc”
I also noticed that I spelled “false” incorrectly in the first step, make sure you spell it right or it wont work.
This is what I have:
{* $Id: short_list.tpl 11191 2010-11-11 11:56:01Z klerik $ }
{* template-description:compact_list **}
{include file=“blocks/list_templates/compact_list.tpl”
show_name=true
show_sku=true
show_price=false
show_add_to_cart=$show_add_to_cart|default:true
but_role=“act”
hide_form=true}
It is still showing those two little columns at the end. I am using community edition though.
show_add_to_cart=$show_add_to_cart|default:true
change the last word in this one to “false” as well.
Are you sure “Compact list” is your default? “List” is default in the standard installation.
[quote name='The Tool' timestamp='1312496578' post='118878']
Are you sure “Compact list” is your default? “List” is default in the standard installation.
[/quote]
He sent me a link to his site and it is the compact list he is using. I thought he was using List at first as well.
I see. Carry on.
[font=“Verdana”]Clear your cache:
../admin.php?cc
```<br />
<br />
Also, rather than just changing the code 'willy nilly', instead track your changes. A simple way is to do this:<br />
<br />
```php
<th>{$lang.price}</th>
```<br />
<br />
```php
{* **DISABLED** <th>{$lang.price}</th> *}<br />
<th style="display: none;">{$lang.price}</th>
```<br />
<br />
This will allow you to search through large files, or search all your files for modifications and revert your disabled or changed code.<br />
<br />
Remember {* blah *} only works in TPL files.<br />
Remember /* blah */ only works in PHP / CSS files.<br />
<br />
<img src="upload://yGrKuhdxbbf2nIFvV2XDJuEFQb7.gif" class="bbc_emoticon" alt=":)">[/font]