X-Cart Mods, X-Cart Addons - WebsiteCM
 
X-Cart Excellence eZine
Subscribe for proven tips and special discounts!
   Forum Search
Forum Menu
Quick Links
Forum Login
Username:

Password

Remember Me
Forum Expert(s)
X-Cart Mods, X-Cart Addons - WebsiteCM
Developing websites since the early-to-mid 90's, and working extensively with e-commerce since 2001, Jon Peters of WebsiteCM is equipped to assist you with your design, programming, e-commerce, and x-cart specific questions.

Updating func.order.php

About this Thread:
You are viewing the thread Updating func.order.php in the eCommerce forum.

  #1  
Old January 14th, 2008, 12:49 PM
tap tap is offline
Junior Member
 
Join Date: Jan 2008
Posts: 14
Default Updating func.order.php

I have modified func.order.php to that when an order is processed (for our software) a registration name and code are created based on the current order information. I know that this is working correctly based on variables I've passed using $mail_smarty->assign.

The thing I'm having difficulty figuring out is how to get these item added to the $products array so that when I reference them in the order_customer email I can set up this:

***************
{section name=prod_num loop=$products}
{if $products[prod_num].productcode == "00100"}

User Name: "{$products[prod_num].reg_name}"
Authorization Code: "{$products[prod_num].reg_code}"
{/if}
{/section}

***************

How do I add these newly created items to the products array?

Thanks, Troy
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old January 14th, 2008, 10:18 PM
admin admin is offline
Jon Peters (Admin)
 
Join Date: Aug 2007
Location: Vancouver, Canada
Posts: 85
Default

What template are you modifying exactly?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old January 16th, 2008, 12:08 PM
tap tap is offline
Junior Member
 
Join Date: Jan 2008
Posts: 14
Default

I had added this loop in skin1/mail/order_customer.tpl and this relates to values that are created in include/func/func.order.php and made available to mail templates through $mail_smarty->assign.

Thanks, Troy
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old January 16th, 2008, 01:49 PM
admin admin is offline
Jon Peters (Admin)
 
Join Date: Aug 2007
Location: Vancouver, Canada
Posts: 85
Default

The new fields, if added to the products table, should already be made available by the query in include/func/func.order.php in the function "func_order_data."
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5  
Old January 16th, 2008, 01:53 PM
tap tap is offline
Junior Member
 
Join Date: Jan 2008
Posts: 14
Default

I had actually added these to the order_details table. Should these items be detected as well? Or should I move these to the products table?

It seemed to me that as this tracks the registration name and code generated for each order it would be more appropriate to add it to the order_details table.

Thanks, Troy
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6  
Old January 17th, 2008, 11:42 AM
admin admin is offline
Jon Peters (Admin)
 
Join Date: Aug 2007
Location: Vancouver, Canada
Posts: 85
Default

Yes that approach would be more appropriate given what you are wanting to accomplish.

First thing to check, is if you are using plain text or html emails. If you are using html emails, then you'll want to be editing the files in skin1/mail/html not skin1/mail. You said you know items are being passed so I presume that is not the issue.

In func_order_data, which is where I believe the $products information is being pulled, the order_details table is being queried also:

Code:
$products = func_query("SELECT $sql_tbl[order_details].itemid, $sql_tbl[products].*, $sql_tbl[order_details].*,  ....
So it's difficult to determine where the problem lies without some debugging. I would start by placing an order, and then modifying the confirmation invoice to display your information, as on this confirmation screen you can hit refresh which is easier than constantly changing order status' to trigger the email notification.

I would then echo some statements in the various func/func.order.php components to see what is happening and ensure that the $products array is being populated where you think it is.

Oh, you also want to ensure that your templates aren't caching preventing your changes from being read.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

Site Map