#1 (permalink)  
Alt 26.02.2005, 17:33
 
Registriert seit: 28.11.2004
Beiträge: 17
Beitrag

Hi all
I have in the file order_mail.html one ean barcode font. Under product modell I have something like that: 3819877897654
I have expected that email notification (about order) will contain this modell written in the barcode format, but displayed is only big font (Arial 28 px).
Is it possible, that product modell will be displayed on the barcode format? I know that customer must have this TTF installed.

Thank you
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #2 (permalink)  
Alt 26.02.2005, 19:10
Erfahrener Benutzer
 
Registriert seit: 07.09.2003
Beiträge: 1.507
Standard

I would suggest to create a barcode image on-the-fly
=>http://pear.php.net/package/Image_Barcode

also there are many available php-classes to do that job easily for different barcode-standards
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #3 (permalink)  
Alt 26.02.2005, 19:49
 
Registriert seit: 28.11.2004
Beiträge: 17
Standard

Zitat:
Originally posted by khan_thep@Feb 26 2005, 20:10 PM
I would suggest to create a barcode image on-the-fly
=>http://pear.php.net/package/Image_Barcode

also there are many available php-classes to do that job easily for different barcode-standards
Thank you.
I have found one sample here: http://www.nieko.net/?view=barcode.php
and now, how can this be included? Is there some gurus?

Cheers
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #4 (permalink)  
Alt 26.02.2005, 20:54
Erfahrener Benutzer
 
Registriert seit: 07.09.2003
Beiträge: 1.507
Standard

This is just a rough advice:

=> send_order.php


most interesting part...
Code:
   $order_query=xtc_db_query("SELECT
      products_id,
      orders_products_id,
      products_model,
      products_name,
      final_price,
      products_quantity
      FROM ".TABLE_ORDERS_PRODUCTS."
      WHERE orders_id='".$insert_id."'");
      

    $order_data=array();
    while ($order_data_values = xtc_db_fetch_array($order_query)) {
    	$attributes_query=xtc_db_query("SELECT
      products_options,
      products_options_values,
      price_prefix,
      options_values_price
      FROM ".TABLE_ORDERS_PRODUCTS_ATTRIBUTES."
      WHERE orders_products_id='".$order_data_values['orders_products_id']."'");
    	$attributes_data='';
    	$attributes_model='';
    	while ($attributes_data_values = xtc_db_fetch_array($attributes_query)) {
    	$attributes_data .=$attributes_data_values['products_options'].':'.$attributes_data_values['products_options_values'].'<br />';
    	$attributes_model .=xtc_get_attributes_model($order_data_values['products_id'],$attributes_data_values['products_options_values']).'<br />';
    	}
    $order_data[]=array(
     'PRODUCTS_MODEL' => $order_data_values['products_model'],
     'PRODUCTS_NAME' => $order_data_values['products_name'],
     'PRODUCTS_SHORT_DESCRIPTION' => xtc_get_short_description($order_data_values['products_id']),
     'PRODUCTS_ATTRIBUTES' => $attributes_data,
     'PRODUCTS_ATTRIBUTES_MODEL' => $attributes_model,
     'PRODUCTS_PRICE' => $xtPrice->xtcFormat($order_data_values['final_price'],true),
     'PRODUCTS_QTY' => $order_data_values['products_quantity']);
    }
=> take note: $oder_data is an array!!!

1. resolve the products EAN for each products_id by sending a second SQL-Query to TABLE_PRODUCTS or by doing a cartesian join in the regular SQL-Query...

2. call your barcode generator with the EAN code. save the generated image to a public folder (a simple cache can easyly be programmed (file_exists()) before calling the gd-functions, that will create the image...)

3. assign the barcode-image-links to the smarty-template ($smart->assign("barcode",$barlink);

4. include the new Variable (note => array!!!) in your order_mail.html template

=> Voila!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #5 (permalink)  
Alt 26.02.2005, 21:51
 
Registriert seit: 28.11.2004
Beiträge: 17
Standard

Hi all
I have tryed this:
Look for the line (in your templates/language/mail/language directory)
<td style="border-right: 2px solid; border-bottom: 2px solid; border-color: #ffffff;">{$order_values.PRODUCTS_NAME}
{$order_values.PRODUCTS_ATTRIBUTES}
</td>

and replace that line with this:

<td style="border-right: 2px solid; border-bottom: 2px solid; border-color: #ffffff;"></a>
{$order_values.PRODUCTS_ATTRIBUTES_MODEL}</td>


Voila !

P.S. problem is voucher code, ie: GIFT_3818876789876 makes not a png picture. GIFT_ must somehow be stripped. Does have anybody a Idea?

Cheers
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #6 (permalink)  
Alt 26.02.2005, 23:31
Erfahrener Benutzer
 
Registriert seit: 07.09.2003
Beiträge: 1.507
Standard

try
Zitat:

barcode={$order_values.PRODUCTS_MODEL|replace:"GIF T_":""}&
instead of

Zitat:

barcode={$order_values.PRODUCTS_MODEL}&

and replace the PRODUCTS_MODEL by your voucher-whatever...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #7 (permalink)  
Alt 05.08.2009, 18:58
Neuer Benutzer
 
Registriert seit: 05.08.2009
Beiträge: 2
Cool EAN 13 Check / Barcode Check

If you need to verify the Barcode, you can use this SQL Statement.

It checks if the EAN13 Checksum is correct.

EAN13 Check - MySQL - Snipplr
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
Antwort

Lesezeichen

Stichworte
barcode, ean

Themen-Optionen
Ansicht

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are aus
Pingbacks are aus
Refbacks are aus



Alle Zeitangaben in WEZ +1. Es ist jetzt 06:26 Uhr.

Copyright © 2011 xt:Commerce GmbH / xt:Commerce International Ltd. - All Rights Reserved

xt:Commerce is a SafeCharge brand