show delivery estimate in front end order status

  • Posts: 76
  • Thank you received: 0
12 years 4 months ago #55579

Hi,

I want the customer is able to view their delivery date estimate when they sign in their account to look at the order status.
How can I do that? see attached.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82820
  • Thank you received: 13368
  • MODERATOR
12 years 4 months ago #55649

You will have to create a custom field of the table "order" via the menu Display->Custom fields.
Then, you will have to edit the file "listing" of the view "order" of the front end via the menu Display->Views and add some code to display the additional information.
You will be able to display the date for the current element like that:

<?php echo $this->row->CUSTOM_FIELD_COLUMN_NAME; ?>


where CUSTOM_FIELD_COLUMN_NAME is the custom field's column name.

Please Log in or Create an account to join the conversation.

  • Posts: 76
  • Thank you received: 0
12 years 4 months ago #55879

Nicolas,

With your instruction, I can only see & edit the "delivery estimate" at the back end ,but it still isn't shown at the front end. See below screen shot.

I've attached the screen shots for the setting on the custom field and the added coding on the file "listing" of the view "order" of the front end.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82820
  • Thank you received: 13368
  • MODERATOR
12 years 4 months ago #55948

I was a bit fast. It should be that code:

<?php echo $row->CUSTOM_FIELD_COLUMN_NAME; ?>


Also, please make sure that you add it in the foreach loop. if you put it at the end like you did, you will only get it once at the end of the table for the last order.

For example you could put it after :
<?php echo hikashop_getDate($row->order_created,'%Y-%m-%d %H:%M');?>

Please Log in or Create an account to join the conversation.

  • Posts: 76
  • Thank you received: 0
12 years 4 months ago #56020

The date appears at the front end ,but the column date didn't show up, there is no space between the date and "delivery date" as well...
See attached screen.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82820
  • Thank you received: 13368
  • MODERATOR
12 years 4 months ago #56053

Yes, you have to add your own column for that.
That is standard HTML code...

Please Log in or Create an account to join the conversation.

  • Posts: 76
  • Thank you received: 0
12 years 4 months ago #56216

Hi, Nicolas,

Please see below screen shot, that's the column name I want to add. Can you show me the coding and where to insert the code. Excuse I am too green on this... :blush:

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82820
  • Thank you received: 13368
  • MODERATOR
12 years 4 months ago #56269

After the code

<th class="hikashop_order_date_title title" align="center">
					<?php echo JHTML::_('grid.sort', JText::_('DATE'), 'a.order_created', $this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value ); ?>
				</th>

add:
<th class="hikashop_order_date_title title" align="center">
					<?php echo JHTML::_('grid.sort', 'Delivery estimate', 'a.deliveryestimate', $this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value ); ?>
				</th>

and after the code:
<td class="hikashop_order_date_value">
						<?php echo hikashop_getDate($row->order_created,'%Y-%m-%d %H:%M');?>
					</td>
add:
<td class="hikashop_order_date_value">
						<?php echo $row->deliveryestimate;?>
					</td>

The following user(s) said Thank You: zoeatdemetra

Please Log in or Create an account to join the conversation.

Time to create page: 0.073 seconds
Powered by Kunena Forum