News:

Looking for documentation? Take a look on our wiki

Main Menu

DHL Shipping and printing shipping labels

Started by durian, January 04, 2006, 18:10:59 PM

Previous topic - Next topic

Jenny

Dear Mike,
How hard would it be to change your tool so that the printing is allowed on the purchaser's side. I am interested in using VirtueMart to sell DHL shipping labels. Please advise.
Jenny

durian

Off the top of my head, I'd think the dhl shipping class wouldn't require many changes.  Most of your effort will go into adding new user interface elements that access the dhl shipping class methods.  Start experimenting with it.  You should get a feel how much work is involved when you start putting it together. The first step, studying and learning the (non-dhl) code that deals with the item definitions, listing and selection will probably take you the longest.

Good luck,
mike

Jenny


holsum

Durian,
   Hey I have been using your DHL shipping & printing module successfully for a few months now, but somewhere in an update/patch things stopped working.  I reninstalled the files and pathces but I get this error code when a customer has to select a shipping option:

DHL XML Repsonse missing result code


Any clues?

Thanks for the best shipping module in VM!
-Holsum

holsum

Durian,
   Nevermind I figured out that when I reninstalled the dhl.cfg.php file it wiped out all of my personal settings i.e.- account numbers, and options.  So I had to chsnge the CHMOD setting to make it writeable add my info and now it is working great again!

Soeren, when is this mod going to be part of the standard virtuemart component?

-Holsum

Soeren

With VirtueMart 1.1. It's already available in the CVS repository.

ciao, Soeren
The future of eCommerce: VirtueMart & Joomla!
http://virtuemart.net

holsum

Durian,
    I wanted to make it easier for new users, as well as people who wanted to upgrade virtuemart, to install this shipping module.

So I went through the DHL module and made it compatible with virtuemart 1.0.6.  Now for anyone who doesn't want to use a "patch" program they can upload this to their existing administrator/component/com_virtuemart folder to install "DHL with printing shipping labels". 

I modified the read me instructions reflect the new procedures.

If anyone finds a mistake or wants to contribute please do!


http://holsumstudios.com/files/dhl.1.0.6.zip

-Holsum

durian

Holsum,
That's a great idea and I'm sure people will appreciate it.

mike

Soeren

Thank you holsum,

here's your official document download on virtuemart.net: http://virtuemart.net/index.php?option=com_docman&Itemid=66&task=doc_details&gid=228.

You're the maintainer of that entry ;)
I would like you to update this file if you released bug fixes.

Thanks!
ciao, Soeren
The future of eCommerce: VirtueMart & Joomla!
http://virtuemart.net

mizanation

#54
hi holsum,

thanks for packaging the DHL module.

i found a couple little errors:

in english.php you have "$_PHPSHOP_SHIPPING_METHOD_DHL_CONTENT_DESC_TOOLTIP" declared twice.  i removed the second declaration and it worked fine.

also, i don't know if you did this on purpose but in ps_checkout.php on line 885 you have:

$q .= "SELECT '', '$order_id', '".$auth['user_id']."', address_type, address_type_name, company, title, last_name, first_name, middle_name, phone_1, phone_2, fax, address_1, address_2, city, state, country, zip, user_email, extra_field_1, extra_field_2, extra_field_3, extra_field_4, extra_field_5,bank_account_nr,bank_name,bank_sort_code,bank_iban,bank_account_holder,bank_account_type FROM #__{vm}_user_info WHERE user_id='".$auth['user_id']."' AND user_info_id='".$d['ship_to_info_id']."' AND address_type='ST'"."' AND address_type='ST'";

i don't know if you wanted to have the "' AND address_type='ST'" twice at the end.

thanks,

miz

mizanation

i don't know if anyone is still checking this thread, but if anyone was having trouble with printing labels in IE, i changed the <object> tag to an <img> tag and it seems to work.  so:

echo '<object data="' . $image_url . '", type="' . $image_type . '", height="' .$dim_y . '", width="' . $dim_x . '" />' . "\n";

becomes:

echo "<img src='" .$image_url. "' border='0'>";

i am not sure if it is necessary to have it in an object tag or not.

durian

I believe I had to use <object> because <img> didn't display properly under Firefox or Konqueror.
I'm not up on all the ins-and-outs, but the doing <object  ... /> might be incorrect.  Perhaps the code needs to be:

echo '<object data="' . $image_url . '", type="' . $image_type . '", height="' .$dim_y . '", width="' . $dim_x . '" >' . "\n" . '</object>' . "\n";

If it's not clear, I'm changing

<object ... />
to
<object ... > </object>


It's something you can try anyway.

mike

mizanation

hi mike, just want to thank you for writing this component.  very good stuff.

curious, what was wrong when you used the <img> tag?  did it not display?  or was something else wrong?

i want to know specifically, just in case using the <img> tag messes up the label or something.

thanks.

durian

It's been a long time, and I don't really remember.  I think without the explicit width and height, the image was not displayed with the proper dimensions.  I think <object> is the way to go.  If it's not working properly under IE, then I'm sure it's just a matter of correcting my malformed HTML.  Did the change I suggested make any difference?

mike

mizanation

hi mike,

no, it's not working with the suggested change.

why can't i just explicitly added the height and width in the <img> tag?  seems like it would work...

also, do i just print these labels on label paper and stick it on my package?

or do i need to get special dhl paper?

thanks,

miz