Post by joananton » Mon Feb 03, 2014 11:25 pm

Hi to all!
Free shipping is $100, and each product's price exceeds $100 automatic showed "Free Shipping". I put this in product.tpl:

<?php if ($price > 100) { ?><h4>Free Shipping</h4><?php } ?>

Is perfect, all working good, but a problem is when product price is up to $999... No showed message "Free shipping"
1.000, 1.001 ... Decimal no working good ???

I running opencart v1.5.5.1

Ideas?

Dale un vistazo a mis extensiones / See my extensions:
http://www.opencart.com/index.php?route ... =joananton


New member

Posts

Joined
Mon Feb 25, 2013 3:27 am

Post by butte » Tue Feb 04, 2014 12:55 pm

If I'm reading that correctly, 101 through 998 shows free shipping, but 999 doesn't, and you cannot enter 1.0000 or 1.0001 (4 significant digits). What about 100.10 and 998.90?

It's 1.5.5.1 . . . Theme? Extensions?

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by joananton » Tue Feb 04, 2014 4:43 pm

Hi butte!
All prices up to $999,99 no showed message.
Core think that thousand is unit when jump to x.xxxx, four digits whith ".".
I use theme default, no extensions.

Dale un vistazo a mis extensiones / See my extensions:
http://www.opencart.com/index.php?route ... =joananton


New member

Posts

Joined
Mon Feb 25, 2013 3:27 am

Post by joananton » Wed Feb 05, 2014 2:29 am

Anyone something?

Dale un vistazo a mis extensiones / See my extensions:
http://www.opencart.com/index.php?route ... =joananton


New member

Posts

Joined
Mon Feb 25, 2013 3:27 am

Post by nvedia » Wed Feb 05, 2014 2:35 am

Are you saying $999.99 doesn't show free shipping ? What is your website?

Donate here to show support if you think I have helped you today!

Opencart Documentation


User avatar
Active Member

Posts

Joined
Sun May 22, 2011 12:54 pm

Post by joananton » Wed Feb 05, 2014 5:44 am

No,
$100 to $999.99 is perfect, showing message "Free shipping" (apply script ok)
$1.000 or up this price no showing message ($1.000 product price for example core think is 1 unit and three zeros = 1$, one dollar, no apply custom script)

Dale un vistazo a mis extensiones / See my extensions:
http://www.opencart.com/index.php?route ... =joananton


New member

Posts

Joined
Mon Feb 25, 2013 3:27 am

Post by butte » Wed Feb 05, 2014 8:04 am

The pricing is customarily entered in admin to four places, such as 99.0000, and it's just as well to put in the zeroes. The storefront shows only the customary digits.

You have spans $0.00 through $99.99 for standard shipping, $100.00 through $999.99 for free shipping, and $1,000.00 up that show incorrectly as standard rather than free shipping.

See what happens if you put in all four of the significant digits, as $1,000.0000 in full (and up from there).

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by joananton » Wed Feb 05, 2014 4:43 pm

Solved!
This isn't more clean, but working to me 8)

In "catalog/language/english/english.php" I make this:

Code: Select all

$_['thousand_point']        = '.';
Change to

Code: Select all

$_['thousand_point']        = '';  // are is blank
Bye!

Dale un vistazo a mis extensiones / See my extensions:
http://www.opencart.com/index.php?route ... =joananton


New member

Posts

Joined
Mon Feb 25, 2013 3:27 am

Post by nvedia » Wed Feb 05, 2014 6:02 pm

How did above solution work? Is it not just used for display?

Donate here to show support if you think I have helped you today!

Opencart Documentation


User avatar
Active Member

Posts

Joined
Sun May 22, 2011 12:54 pm

Post by joananton » Wed Feb 05, 2014 6:20 pm

Hi nvedia,
I tried using "number_format" in thousand units:

Code: Select all

<?php
$thousand = $price;
number_format($thousand, 2, '.', '');
if ($thousand > 100)
  {
  echo "<h4>Free Shipping</h4>";
  }
?>
But no working to me :-\ , I think change this is more fasted.

Bye!

Dale un vistazo a mis extensiones / See my extensions:
http://www.opencart.com/index.php?route ... =joananton


New member

Posts

Joined
Mon Feb 25, 2013 3:27 am

Post by butte » Thu Feb 06, 2014 11:03 am

You can edit your OPENING title Solved. That's not intuitively or otherwise obvious, but that's the only way to mark the whole thread Solved.

However, what nvedia was getting at is that you've amended only the language file for the on-screen display (separator can be European . or North American , or none, so settable as '.' or ',' or ''). How that should alter triggering the free shipping is his question. If there is a prior example of that arising in 1.5.5.1, I don't recall it, either.

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am
Who is online

Users browsing this forum: No registered users and 13 guests