Jump to content

Edit History

ps8modules

ps8modules

On 8/3/2023 at 11:02 PM, seok said:

1. post:

I am adding codes in order-detail.tpl to show a estimated date of delivery to customers from that is not available any module compatible with PS 8

My variable of order date is: {$order.details.order_date|date_format:"%A, %e %B of %Y"}

I want to join together {$order.details.order_date} with the code {"+8 days"|strtotime|date_format:"%A, %e %B of %Y"}

 

My full code of smarty now is: 

 {assign var="Delivery_day" value=$smarty.now|date_format:"%u"}
  <b>{l s='Estimated delivery day'}</b>
    {if $Delivery_day == 1}
        {"+8 days"|strtotime|date_format:"%A, %e %B del %Y"}
    {/if}
    {if $Delivery_day == 6}
        {"+9 days"|strtotime|date_format:"%A, %e %B of %Y"}
    {/if}
    {if $Delivery_day > 0 && $Delivery_day < 6}
        {"+8 days"|strtotime|date_format:"%A, %e %B of %Y"}
    {/if}

 

I tried with {"$order.details.order_date+8 days"|strtotime|date_format:"%A, %e de %B del %Y"} but it give me error, i am not expert.

 

Can you help me?

 

2. post:

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?

Hi.

And you don't want to put the solution here for others?

Thank you

ps8modules

ps8modules

On 8/3/2023 at 11:02 PM, seok said:

1. post:

I am adding codes in order-detail.tpl to show a estimated date of delivery to customers from that is not available any module compatible with PS 8

My variable of order date is: {$order.details.order_date|date_format:"%A, %e %B of %Y"}

I want to join together {$order.details.order_date} with the code {"+8 days"|strtotime|date_format:"%A, %e %B of %Y"}

 

My full code of smarty now is: 

 {assign var="Delivery_day" value=$smarty.now|date_format:"%u"}
  <b>{l s='Estimated delivery day'}</b>
    {if $Delivery_day == 1}
        {"+8 days"|strtotime|date_format:"%A, %e %B del %Y"}
    {/if}
    {if $Delivery_day == 6}
        {"+9 days"|strtotime|date_format:"%A, %e %B of %Y"}
    {/if}
    {if $Delivery_day > 0 && $Delivery_day < 6}
        {"+8 days"|strtotime|date_format:"%A, %e %B of %Y"}
    {/if}

 

I tried with {"$order.details.order_date+8 days"|strtotime|date_format:"%A, %e de %B del %Y"} but it give me error, i am not expert.

 

Can you help me?

 

2. post:

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?

Hi.

And you don't want to put the solution here for others?

ps8modules

ps8modules

On 8/3/2023 at 11:02 PM, seok said:

I am adding codes in order-detail.tpl to show a estimated date of delivery to customers from that is not available any module compatible with PS 8

My variable of order date is: {$order.details.order_date|date_format:"%A, %e %B of %Y"}

I want to join together {$order.details.order_date} with the code {"+8 days"|strtotime|date_format:"%A, %e %B of %Y"}

 

My full code of smarty now is: 

 {assign var="Delivery_day" value=$smarty.now|date_format:"%u"}
  <b>{l s='Estimated delivery day'}</b>
    {if $Delivery_day == 1}
        {"+8 days"|strtotime|date_format:"%A, %e %B del %Y"}
    {/if}
    {if $Delivery_day == 6}
        {"+9 days"|strtotime|date_format:"%A, %e %B of %Y"}
    {/if}
    {if $Delivery_day > 0 && $Delivery_day < 6}
        {"+8 days"|strtotime|date_format:"%A, %e %B of %Y"}
    {/if}

 

I tried with {"$order.details.order_date+8 days"|strtotime|date_format:"%A, %e de %B del %Y"} but it give me error, i am not expert.

 

Can you help me?

 

2nd.

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?

Hi.

And you don't want to put the solution here for others?

ps8modules

ps8modules

On 8/3/2023 at 11:02 PM, seok said:

I am adding codes in order-detail.tpl to show a estimated date of delivery to customers from that is not available any module compatible with PS 8

My variable of order date is: {$order.details.order_date|date_format:"%A, %e %B of %Y"}

I want to join together {$order.details.order_date} with the code {"+8 days"|strtotime|date_format:"%A, %e %B of %Y"}

 

My full code of smarty now is: 

 {assign var="Delivery_day" value=$smarty.now|date_format:"%u"}
  <b>{l s='Estimated delivery day'}</b>
    {if $Delivery_day == 1}
        {"+8 days"|strtotime|date_format:"%A, %e %B del %Y"}
    {/if}
    {if $Delivery_day == 6}
        {"+9 days"|strtotime|date_format:"%A, %e %B of %Y"}
    {/if}
    {if $Delivery_day > 0 && $Delivery_day < 6}
        {"+8 days"|strtotime|date_format:"%A, %e %B of %Y"}
    {/if}

 

I tried with {"$order.details.order_date+8 days"|strtotime|date_format:"%A, %e de %B del %Y"} but it give me error, i am not expert.

 

Can you help me?

Hi.

And you don't want to put the solution here for others?

×
×
  • Create New...