Advertisement:

Author Topic: "Check with seller and 0"  (Read 45858 times)

sundance

  • Sr. Member
  • ****
  • Posts: 384
"Check with seller and 0"
« on: November 15, 2011, 05:50:20 am »
Until 2.3 becomes stable (I know it is fixed there) can someone tell me how to fix the issue with "check with seller" and 0? I can make it do one or the other, but the code is glitching to where even though it says to, it won't do both.
right now mine says:
 function osc_format_price($price) {
        if ($price == 0) return __('Free') ;
        if ($price == null) return __('Check with seller') ;
        //if ($price == 0) return __('Free') ;
        $currencyFormat =  osc_locale_currency_format();

It still says only "free" because the site adds a 0 even if you leave it blank. Does anyone know what they did to fix it so I could fix it for my 2.2.3?

trains58554

  • Osclass contributor
  • Hero Member
  • *****
  • Posts: 3642
  • osCanyon, the class of Osclass
Re: "Check with seller and 0"
« Reply #1 on: November 15, 2011, 08:02:53 am »
Hi

I have found the commit of the changes they did to fix this problem. I tried the changes on my 2.2.3 but it did no change I think there must be anther file that needs changing. Anyways here is a link to the changes.

https://github.com/osclass/OSClass/commit/31d66f8bb3f65b6dae4a4ee65e8620a9bc4ffdd6

Jay

Evelyne

  • Full Member
  • ***
  • Posts: 134
Re: "Check with seller and 0"
« Reply #2 on: May 19, 2012, 08:30:24 pm »
It still says only "free" because the site adds a 0 even if you leave it blank. Does anyone know what they did to fix it so I could fix it for my 2.2.3?

I've been having to manually correct prices because it's changing to "0" prices left blank, and it's publishing them as "Free", which causes A LOT of confusion!!!

How can I stop this "null" turning into "0"?

I checked Jay's link, but both lines highlighted are as he mentioned in his post, and I'm still getting the problem:

oc-includes/osclass/installer/struct.sql:
207     i_price BIGINT(20) NULL,

/oc-includes/osclass/ItemActions.php
1074            $aItem['price']         = (Params::getParam('price') != '') ? Params::getParam('price') : null;

Any ideas on  how to fix the automatic conversion of NULL to "0" when posting a new ad?
« Last Edit: May 19, 2012, 08:36:58 pm by Evelyne »

hallartistry

  • Full Member
  • ***
  • Posts: 133
Re: "Check with seller and 0"
« Reply #3 on: June 02, 2012, 12:25:33 am »
I'm getting the same problem. It used to say Check with Seller, but now it says Free when the price is 0? Not sure what happened!

hallartistry

  • Full Member
  • ***
  • Posts: 133
Re: "Check with seller and 0"
« Reply #4 on: June 02, 2012, 12:29:33 am »
Oh, nevermind lol  I just noticed it is supposed to say Free when someone puts 0 in the price, and it does say check with seller when there is nothing in the price field. All clear now! I just need to specify that in the ad post so people know that if they don't want it to say free they need to just not put anything in the price box.

guitarrista

  • Newbie
  • *
  • Posts: 17
Re: "Check with seller and 0"
« Reply #5 on: April 13, 2016, 06:57:41 am »
Until 2.3 becomes stable (I know it is fixed there) can someone tell me how to fix the issue with "check with seller" and 0? I can make it do one or the other, but the code is glitching to where even though it says to, it won't do both.
right now mine says:
 function osc_format_price($price) {
        if ($price == 0) return __('Free') ;
        if ($price == null) return __('Check with seller') ;
        //if ($price == 0) return __('Free') ;
        $currencyFormat =  osc_locale_currency_format();

It still says only "free" because the site adds a 0 even if you leave it blank. Does anyone know what they did to fix it so I could fix it for my 2.2.3?

Where to find this code? Pls. help.