Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Basket/Cart plugin for GetSimple
#10
Wink 
(2015-06-12, 08:53:47)morvy Wrote: Hey Cupuyc1989 Smile

you have small bug in quantity logic > you're using !empty so it won't trigger on quantity = 0, but you have a condition to unset item, if there is 0, so instead of !empty you should use isset

Quote:The following things are considered to be empty:

"" (an empty string)
0 (0 as an integer)
0.0 (0 as a float)
"0" (0 as a string)
NULL
FALSE
array() (an empty array)
$var; (a variable declared, but without a value)

See under "Return Values" section http://php.net/manual/en/function.empty.php ;-)
Reply


Messages In This Thread
Basket/Cart plugin for GetSimple - by Cupuyc1989 - 2014-08-03, 05:06:21
RE: Basket plugin for GetSimple - by shawn_a - 2014-08-03, 09:28:09
RE: Basket plugin for GetSimple - by Cupuyc1989 - 2014-08-06, 04:49:08
RE: Basket/Cart plugin for GetSimple - by Lars - 2014-08-20, 04:11:19
RE: Basket/Cart plugin for GetSimple - by D.O. - 2014-09-04, 20:40:31
RE: Basket/Cart plugin for GetSimple - by Artur - 2015-06-06, 20:13:31
RE: Basket/Cart plugin for GetSimple - by morvy - 2015-06-08, 09:02:03
RE: Basket/Cart plugin for GetSimple - by morvy - 2015-06-12, 08:53:47
RE: Basket/Cart plugin for GetSimple - by Bigin - 2015-06-12, 16:10:11
RE: Basket/Cart plugin for GetSimple - by hddg - 2015-11-02, 09:22:39
RE: Basket/Cart plugin for GetSimple - by Oleg06 - 2020-05-02, 18:05:34
RE: Basket/Cart plugin for GetSimple - by NCardia - 2020-11-18, 06:22:04
RE: Basket/Cart plugin for GetSimple - by NCardia - 2020-11-18, 06:26:37



Users browsing this thread: 1 Guest(s)