X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Custom order data (email) error (https://forum.x-cart.com/showthread.php?t=1591)

TeeJay 02-21-2003 11:58 PM

Custom order data (email) error
 
Hope someone can help me with this.

I am trying to create a custom order_data.tpl to be included in the provider order_notification.tpl template.
Here is what I did.

Created a new template called order_data_provider.tpl

{* $Id: order_data.tpl,v 1.23 2002/11/22 06:26:07 svowl Exp $ *}
{$lng.lbl_products_ordered}:
------------------------------------------------

{section name=prod_num loop=$products}
{$lng.lbl_sku}: {$products[prod_num].productcode}
{$lng.lbl_product}: {$products[prod_num].product}
{$lng.lbl_quantity}: {$products[prod_num].amount}
{if $products[prod_num].product_options ne ""}
{$lng.lbl_selected_options}:
{$products[prod_num].product_options|replace:"\n":"\n "}
{/if}


Then altered the order_notification.tpl

{* $Id: order_notification.tpl,v 1.16 2002/10/25 12:40:11 alfiya Exp $ *}
{config_load file="$skin_config"}
{$lng.eml_this_is_order} {$order.orderid} {$lng.eml_notification}.

{$lng.lbl_order_id}: #{$order.orderid}
{$lng.lbl_order_date}: {$order.date|date_format:"%d.%m.%Y %H:%M"}
{$lng.lbl_order_status}: {$order.status}
-------------------------------------------------

{$lng.lbl_shipping_address}:
-------------------------------------------------
{$order.firstname} {$order.lastname}
{$order.s_address}
{$order.s_city}
{$order.s_statename}
{$order.s_countryname}
{$order.s_zipcode}
{$order.phone}
-------------------------------------------------

{include file="mail/order_data_provider.tpl"}

{include file="mail/signature.tpl"}


The error I get in the provider email is



Parse error: parse error, unexpected $ in /home/mas/public_html/shop/templates_c/%%538/%%538954996/order_data_provider.tpl.php on line 47


Where the order data should be.

Any ideas
I have acheived this on a previous install of X-Cart but I can't see what I'm doing wrong.

Thanks in advance
Terry

TeeJay 02-23-2003 04:39 PM

Anyone ?

shan 02-24-2003 03:23 AM

Im not sure what it is your trying to do but looking at the code you have for order_data_provider.tpl it looks as if the code is incomplete.

The section code does not get closed

This is the code form order_data.tpl in its complete form.

Code:

{section name=prod_num loop=$products}
{$lng.lbl_sku}:        {$products[prod_num].productcode}
{$lng.lbl_product}:    {$products[prod_num].product}
{$lng.lbl_quantity}:  {$products[prod_num].amount}
{if $products[prod_num].product_options ne ""}
{$lng.lbl_selected_options}:
  {$products[prod_num].product_options|replace:"\n":"\n  "}
{/if}
{$lng.lbl_item_price}: {include file="currency.tpl" value=$products[prod_num].price}


{/section}


TeeJay 02-24-2003 09:52 AM

Thanks
 
Thank you Shan
That is exactly what I needed (I'm not a programmer as you can see)

All this is, is a taylored order notification email to the provider, as I use drop shipping, I dont want the provider to see all the details so I set up a seperate order_data_provider based on the original order-data and altered the include in order_notification to include the new version instead.

Terry


All times are GMT -8. The time now is 05:47 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.