Using token hooks will standardize replacement tokens allowing them to be used by other modules and template files will allow for complete flexibility and control over exported data.

Cheers,

Antoine

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jantoine’s picture

Status: Active » Needs review
FileSize
42.54 KB

A patch is attached with the following features:
- Added template documentation to the README.txt file.
- Added a dependency on the token module.
- Implemented hook_help() with the same documentation that's in the README.txt file.
- Added a new "export" tab to the order view page (see documentation for use).
- Implemented hook_theme() for using template files to replace export patterns.
- Implemented hook_token_values() to define default variables available in template files.
- Implemented hook_token_list().
- Implemented and documented hook_uc_edi_templates() to provide a default template.
- Replaced "export pattern", "product export pattern" and "delimiter" settings with a template selection setting.
- Implemented the default template_preprocess_uc_edi() function adding all order tokens as variables including those properly defined by other contributed modules.
- Removed the uc_edi_generate_order_export(), uc_edi_generate_order_product_export(), uc_edi_order_values(), uc_edi_order_product_values(), uc_edi_default_order_export_pattern() and uc_edi_default_order_product_export_pattern() deprecated functions.
- Added a uc_edi-default.tpl.php template file and a dummy uc_edi.tpl.php template file to the project.

Cheers,

Antoine

jantoine’s picture

FileSize
47.27 KB

Updated patch against head.

Cheers,

Antoine

WebNewCastle’s picture

Antoine, absolutely fantastic! Works like a charm. Thanks and great job.

For others who are looking to do similar things, I set someone up with full fulfillment integration fairly quickly, with nearly 5 dozen columns for a particular fulfillment house. Getting shipping specifics, attributes like color and size, a unique identifier (I used the order product id), etc. is fairly simple.

jantoine’s picture

Status: Needs review » Fixed
FileSize
47.91 KB

WebNewCastle,

Glad this patch worked out well for you. I am attaching a new patch that updates CHANGELOG.txt and have committed this patch to head!

Cheers,

Antoine

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

shajjadbd’s picture

Component: Code » Documentation
Category: task » support
Priority: Normal » Critical
Status: Closed (fixed) » Active

Hello Antoine,
I am desperately looking help for EDI import/export guide. My requirement is import/export orders into my e-commerce site but I didn't find any format for import orders. I have already setup uc_edi-6.x-1.0 module and created import/export file by following 'order export pattern' in EDI documentation but it doesn't work. I think my format is wrong. Please help me by providing proper instructions and a working import/export format. I need a solution desperately from people like you.

BR
Shajjadbd

jantoine’s picture

Component: Documentation » Code
Category: support » task
Priority: Critical » Normal
Status: Active » Fixed

@shajjadbd,

Please do not re-open nearly year old issues and change all the settings, rather open a new issue.

To briefly address your issue, it sounds like you are mostly having issues with the import process which has not changed much since version 5.x-1.x. Please see #400220: Add ability to import new orders for more information. The 6.x-1.x-dev release does contain a few bug fixes to the import process, so I would update the module to that version (note that upgrading to 6.x-1.x-dev will change the export process to use template files). All help can be found in the Drupal help system of the site the module is installed on or in the README.txt file that comes with the module. This is all the support I offer for the import process. If you have further questions, please open a separate issue.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.