网络营销电子商务研究中心  
How to buy the best prescription safety glasses in Canada? Let's study!
Go Back   网络营销电子商务研究中心 > 网站建设 > X-Cart
User Name
Password
 
FAQ Members List Calendar Cheap Glasses

Reply
 
Thread Tools Display Modes
  #1   IP: 49.87.40.73
Old 2015-12-02, 06:47 PM
Hahira Hahira is offline
初级会员
 
Join Date: 2012-02-21
Posts: 1
Hahira 现在声名狼藉
Default Display product extra field data on Invoice

We have a music store where about 2/3 of all products are sheet music. Each piece of sheet music has been sucessfully set up in X-cart 4.4.5 with extra fields for things like Orchestration, Publisher, etc. I need the ability to display some of these extra fields on the invoice (with each sheet music product ordered) so that the Admin can print it and that the customer can see it. I have gotten very close on my own but can't seem to get it to work.

So here is an update to this ticket for all who want to be able to display extra fields on the Invoice. This is currently working on X-Cart 4.5.4 and I have more than a few people ask me how to do it. My thanks to Qualiteam and the other posters on this thread for their assistance.

Create a NEW file: /skin/<yourskin>/modules/Extra_Fields/product_extra_fields_invoice.tpl
Code:
{foreach from=$product.extra_fields item=v}
  {if $v.service_name eq $xtrafieldservicename and $v.active eq "Y" and $v.value}
    <div>
      <span style="font-style: italic;">{$v.field}:&nbsp;{$v.value}</span>
    </div>
  {/if}
{/foreach}
Then MODIFY the file: /skin/<yourskin>/mail/html/order_data.tpl
by placing the following new if statement code inside the loop:
Code:
{foreach from=$products item=product}
and after the if statement:
Code:
{if $active_modules.Gift_Registry}
          {include file="modules/Gift_Registry/product_event_invoice.tpl"}
 {/if}
Here is the code to be added.
Code:
 {if $active_modules.Extra_Fields}
          {include file="modules/Extra_Fields/product_extra_fields_invoice.tpl" xtrafieldservicename="xfieldservicename1"}
          {include file="modules/Extra_Fields/product_extra_fields_invoice.tpl" xtrafieldservicename="xfieldservicename2"}
          {include file="modules/Extra_Fields/product_extra_fields_invoice.tpl" xtrafieldservicename="xfieldservicename3"}
        {/if}
Obviously you will need to replace the values "xfieldservicename1","xfieldservicename2","xfields ervicename2" with teh actual xtrafieldservicename from your database.

Hope this helps lots of folks, being able to add extra field data easily to lots of places inside X-cart would be a great built in feature for QT to add in the future. Examples include Cart page, Invoice (shown here), WishList page, New Arrivals Page, Product listing page, etc. Maybe if this post gets lots of attention "thanks", they will consider it.
Reply With Quote
Reply


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

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PayPal 出错处理 Queen 电子商务 2 2014-11-15 11:03 AM
Zen-cart Easy Populate Deleting of product data debris failed!... topvip ZenCart 0 2012-12-21 07:24 PM
x-cart Template Editing Guide for 4.1.x topvip X-Cart 0 2009-04-15 11:42 PM
Template Editing Guide for 4.1.x topvip X-Cart 0 2009-03-10 08:12 AM

Prescription-glasses.com offers prescription glasses online at discount prices.
All times are GMT +8. The time now is 10:44 AM.


Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.