Jump to content

Edit History

seok

seok


solved

0 help from forum, i solved my needs

seok

seok

I'm moving forward, the right code that adds the days is: {$order.details.order_date|replace:'/':'-'|cat:' +8 days'|date_format:'%A, %e %B of %Y'}

Now the conditions "if" is not working, it only read the first "if" for all day of order:

{assign var="Delivery_day" value=$smarty.now|date_format:"%u"}

    {if $Delivery_day == 7} *// sunday
        {$order.details.order_date|replace:'/':'-'|cat:' +9 days'|date_format:'%A, %e %B of %Y'}
    {/if}
    {if $order.details.order_date == 5} *// friday
        {$order.details.order_date|replace:'/':'-'|cat:' +10 days'|date_format:'%A, %e %B of %Y'}
    {/if}
    {if $order.details.order_date == 6} *// saturday
        {$order.details.order_date|replace:'/':'-'|cat:' +10 days'|date_format:'%A, %e %B of %Y'}
    {/if}
    if $Delivery_day > 0 && $Delivery_day < 5} *//monday,tuesday,wednesday,thursday
        {$order.details.order_date|replace:'/':'-'|cat:' +8 days'|date_format:'%A, %e %B of %Y'}
    {/if}

The Assign var is wrong?

×
×
  • Create New...