Filter Null
Permalink
Can anyone help me? I've come code that filters on a particular attribute. It works well, but I need to filter out status' that are null, which doesn't work. What should it be?
<?php if(!$order->getAttribute('catalyst_order_status') || $order->getAttribute('catalyst_order_status') == 'Canceled'){ ?> <div class="alert block-message alert-error"> <p><?php echo Config::get('ORDER_CANCEL'); ?></p> </div> <?php }elseif(!$order->getAttribute('catalyst_order_status') || $order->getAttribute('catalyst_order_status') == 'Open'){ ?> <?php }elseif(!$order->getAttribute('catalyst_order_status') || $order->getAttribute('catalyst_order_status') == ''){ ?> <div class="alert-actions"> </div> <?php } ?>
Possibly something like this (Untested)
Thanks. I’ve put the code in and get the following error:
Parse error: syntax error, unexpected '$attrvalue' (T_VARIABLE), expecting '(' in /home/catalyst/public_html/testsystem/packages/catalyst/single_pages/dashboard/catalyst/orders.php on line 55
Line 55 is the first line of your code. Thoughts?
> On 17 Feb 2018, at 06:52, concrete5 Community <discussions@concretecms.com> wrote:
Parse error: syntax error, unexpected '$attrvalue' (T_VARIABLE), expecting '(' in /home/catalyst/public_html/testsystem/packages/catalyst/single_pages/dashboard/catalyst/orders.php on line 55
Line 55 is the first line of your code. Thoughts?
> On 17 Feb 2018, at 06:52, concrete5 Community <discussions@concretecms.com> wrote: