Jump to content

How to Remove $0.00 in Catalog mode


peachcouch
 Share

Recommended Posts

Hi Everybody!

 

Is there any way we can hide the $0.00 in catalog mode without affecting the customer order status lookup?

 

I know we can do the hide prices fix wherein the prices becomes x.xx but doing this actually affects the part when the customer tries to lookup the status of their order as this also shows x.xx until the customer is registered and login. We do not really want this to happen as we do not really require customer to login because all or most of the ordering is done on the admin side. All we really wanted to do is to hide the $0.00 that is showing on each product that is being shown on our website.

 

Is there anyone who can help me achieve this or at least put me in the right direction?

 

Thanks in advance.

Link to comment
Share on other sites

This is kind of tricky. I'm working with CC514, and I will check with CC515 as soon as I can.

 

Two things:

 

Edit the file /classes/tax.class.php, at around line 225, find the public function priceFormat(). About 10 lines down, find this:

above that, find: after those two:

if ($GLOBALS['session']->get('hide_prices')) {
Make it look like this:
if ($GLOBALS['session']->get('hide_prices') && !$GLOBALS['session']->has('ghost_customer_id')) {
This will still hide all the prices. Until CubeCart has specifically determined that the visitor is a past customer (having an account or not), but not logged in, then CubeCart will show the prices.

 

But to make it for this screen only, we need to make this edit:

In /classes/cubecart.class.php, about line 2100, find the private function _product(). About 10 lines 
                    $GLOBALS['smarty']->assign('SUM', $order);

                    $GLOBALS['smarty']->assign('ORDER', $order);
Add this line 
$GLOBALS['session']->delete('ghost_customer_id');

This tells CubeCart to restore showing prices to the current setting.

 

 

Next, the $x.xx prices when prices are hidden can be changed. One way is to edit the language strings so that it looks like $CALL (for example). The other is to kill the code that creates $x.xx. If you want to do that, let us know.

Link to comment
Share on other sites

Hi bsmither thank you! I will try to test this on CC515 hopefully it should work. Will update the forum once I have done it.

 

I have this logic in mind but I am not sure if it will work. It's really just the $0.00 that is the problem so...is it possible to just make a  condition wherein if value of the product is $0.00 then the price is hidden else the price is still shown. That way we do not even really have to go into touching the $x.xx part of the cubecart plus orders that has actual price value will not be affected? I just could not formulate the language but I have a feeling it might actually work.

Link to comment
Share on other sites

Hi bsmither! Tried the codes that Markscarts did unfortunately it did not work for me I am getting an http Error 500 on my website every time the codes are inserted. I also looked into your suggestion and was glad that when I inserted the codes nothing dramatic happened on my website; however, on catalogue mode I still see the price $0.00 so it did not really change anything at all. 

 

At the moment the only solution I can think of is to just hide the price until login in the admin settings. I just change the x.xx into  "----" and I found out that you can actually save an empty box for the languages which means the word Login to View Prices is totally gone. The is just a stop gap until a solution has been found because this will affect the customer having to lookup their order as this will show "---" until they're login.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...