osse LiteCart Fan Frá Sweden Meðlimur síðan des. 2013 osse 13 feb. 2017 09:11 Hi. I would like to change Quantity so that it shows yes or no, instead of the quantity. How do I do that? This should work but do you have a better solution? if !empty($product->quantity) { $prodquant = 'yes'; } else { $prodquant = 'no'; } // Change 'Lagerstatus' => $product->quantity, 'Lagerstatus' => $prodquant,
tim Founder Frá Sweden Meðlimur síðan maí 2013 tim 13 feb. 2017 10:47 Avoid variable duplication: 'Lagerstatus' => !empty($product->quantity) ? 'yes' : 'no',
osse LiteCart Fan Frá Sweden Meðlimur síðan des. 2013 osse 13 feb. 2017 21:20 Thanks for that fine solution :)