WordPress.org

Forums

WooCommerce Print Invoice & Delivery Note
[resolved] [Plugin: WooCommerce Delivery Notes] Second template for Invoice vs. Packingslip (29 posts)

  1. WP Lab
    Member
    Posted 3 years ago #

    Thanks for your great plugin.

    I'm currently extending it to support a second template so that the user can print either an "invoice" OR an "packing slip". I have a user who needs both to be separate templates.

    Would you like to include the modifications in your plugin (please) ?

    I also added tags (functions) for phone number and the custom order_number provided by this plugin: http://wordpress.org/extend/plugins/woocommerce-sequential-order-numbers/

    I know, there's a premium plugin doing this... and I'll always prefer plugins on wordpress.org ;-) Thanks again for saving me some time today.

    http://wordpress.org/extend/plugins/woocommerce-delivery-notes/

  2. daveshine (David Decker)
    Member
    Plugin Author

    Posted 3 years ago #

    Hi there!

    Thank you for your feedback and using this plugin!!

    Of course, any contributions are welcomed! Please note that I have a co-author now and development primarily goes on GitHub.com, so you might also have a look at the current code base there: https://github.com/deckerweb/woocommerce-delivery-notes

    But I guess we could manage it all together with a second template :)

    Thanks for adding the number stuff also!

    I am curious with what you are coming up with!

    Greetinx, Dave :)

  3. WP Lab
    Member
    Posted 3 years ago #

    Ok, I cleaned up my changes and commented them nicely... and then when I wanted to fork the github repo, I realized, there is a completely different version on github that here on wordpress.org. At least you changed the whole file and folder structure and renamed a couple of files. Hm...

    So, I just packed my version for now and sent you a link via twitter. Do you think, you could implement my changes in the development version on github?

  4. WP Lab
    Member
    Posted 3 years ago #

    So, by now I've studied your code on github - to see that you already have implemented a second template and button for printing invoices at least two months ago.

    I don't understand, why you didn't publish the recent github code on wordpress.org. What exactly are you waiting for?

    I've seen that you changes the naming scheme of the template files but you included extra legacy code to support the old scheme as well. In my eyes it looks ready to go.

    Matt

  5. daveshine (David Decker)
    Member
    Plugin Author

    Posted 3 years ago #

    Hi there!

    All the current stuff since Feb/March was done by the co-author who did also the original code base for Jigoshop - not by myself!

    I am currently knee-deep in other projects - including the updating my other plugins for WP 3.4.

    Thank you very much for your contributions - we will try to implement as much as possible. If I have any further questions or feedback I'll contact you!

    I guess the release of new version may be sometime later this month...

    Thanks for your patience!
    -Dave :)

  6. alvbayu
    Member
    Posted 3 years ago #

    Hi,
    Just wanna say (to both of you) that WooCommerce Delivery Notes is very useful for me..
    I hope you guys develop this great plugin more and more..
    Good luck with what you are doing there.

    :)

    -- thanks --

  7. sexysusie
    Member
    Posted 2 years ago #

    Since the last update i can't print the delivery note and the invoice anymore. I get a message that i don't have the permission to see that page.
    What's the problem and how can i solve this problem?

  8. daveshine (David Decker)
    Member
    Plugin Author

    Posted 2 years ago #

    @sexysusie:

    Hi there!

    Try to de-activate and re-activate the plugin.
    Then go to WooCommerce > Settings > Print and re-adjust and re-save the settings.

    Then go to your orders and try to re-print an invoice or a delivery note.

    Otherwise, if it is still not working do a bug report here:
    https://github.com/piffpaffpuff/woocommerce-delivery-notes/issues

    Hope that helps a bit,
    Dave :)

  9. daveshine (David Decker)
    Member
    Plugin Author

    Posted 2 years ago #

    @sexysusie:

    Also, if you had a custom template in use, you have to re-name the folder after the update.
    So from:

    your-theme/woocommerce/delivery-note-template/

    to:

    your-theme/woocommerce/delivery-notes/

    -Dave :)

  10. sexysusie
    Member
    Posted 2 years ago #

    @daveshine:

    I did the first but that didn't help.
    And what is a custom template, i don't think i have it, because i didn't made things by myself.

  11. daveshine (David Decker)
    Member
    Plugin Author

    Posted 2 years ago #

    @sexysusie:

    I am sorry I can't help any further - I am no longer the plugin's main author and the new author is the expert for the new and changed code base.

    I strongly encourage, that you do an error report here:
    https://github.com/piffpaffpuff/woocommerce-delivery-notes/issues

    Thanx, Dave :)

  12. daveshine (David Decker)
    Member
    Plugin Author

    Posted 2 years ago #

    ...have you a proper user role like "shop manager" (set from WooCommerce) or "Administrator" with proper capabilities?

  13. sexysusie
    Member
    Posted 2 years ago #

    No i'm only using admin that i have choosen with using wordpress.

  14. sexysusie
    Member
    Posted 2 years ago #

    there is something different in the update that makes that i don't have permission to see the delivery note.

    aarghhh

  15. piffpaffpuff
    Member
    Plugin Author

    Posted 2 years ago #

    which woocommerce version do you use? your user profile needs to have 'manage_woocommerce_orders' capability. normally woocommerce adds this to the admin user. try to deactivate/activate woocommerce.

    if this won't help try the following and please report back:
    1. open /wp-content/plugins//woocommerce-delivery-notes/woocommerce-delivery-notes-print.php in a text or code editor.
    2. go to line 22 which looks like this:

    if (!current_user_can('manage_woocommerce_orders') || empty($id) || empty($name)) {

    and replace it with this:

    if (!current_user_can('manage_options') || empty($id) || empty($name)) {

    3. save and upload the file and try to print again.

  16. sexysusie
    Member
    Posted 2 years ago #

    I'm using woocommerce 1.5.4 with wordpress 3.3.2

    I did both but it's still doing nothing :-(

  17. piffpaffpuff
    Member
    Plugin Author

    Posted 2 years ago #

    ok then try to change the line to this:

    if (!current_user_can('manage_options')) {

    and try again.

  18. sexysusie
    Member
    Posted 2 years ago #

    @chabis,

    Thanks it works!!!!

  19. piffpaffpuff
    Member
    Plugin Author

    Posted 2 years ago #

    ok cool. but not really good for you or the plugin code. it could maybe be a server issue on your side. could you please help test something? replace the line with this:

    if (!current_user_can('manage_woocommerce_orders') || empty($_REQUEST['order']) || empty($_REQUEST['name'])) {

    and if it does work, try it with this:

    if (!current_user_can('manage_woocommerce_orders') || empty($_GET['order']) || empty($_GET['name'])) {

    thanks for testing.

    btw: do you use the "print invoice" or "print delivery note" buttons to start the printing or do you have some custom code running?

  20. sexysusie
    Member
    Posted 2 years ago #

    The first one works.
    Do i have to try the second one also?
    And wich code is the best to use?

    I use the buttons.

  21. piffpaffpuff
    Member
    Plugin Author

    Posted 2 years ago #

    thanks for testing. could you please test the second line too with the $_GET in it? if it doesn't work revert back to this:

    if (!current_user_can('manage_woocommerce_orders') || empty($_REQUEST['order']) || empty($_REQUEST['name'])) {

  22. WP Lab
    Member
    Posted 2 years ago #

    Thanks for updating the plugin with the latest code from github. Finally, we all get that "second template for invoices" feature that this post originally was about ;-)

    I just finished adding the other changes to the new codebase, including support for the Custom Order Number plugin / field. Also, I'd recommend passing the full order $item array to the template for iterating, so that template developers have more freedom and possibilities to parse the item data.

    I was about to ask, to which github repo I should send my pull requests, but I just read your new info about migration to the new one and now all is clear ;-)

    So, let's move over to github - they have syntax highlighting...

  23. WP Lab
    Member
    Posted 2 years ago #

    Oh, and I forgot to add:

    I had no problems whatsoever migrating to the new version. My admin user could access orders as usual and the old template file was found immediately - and after I changed the folder structure as decribed the FAQ here on wp.org, the second template worked right out of the box.

    Thanks again!

  24. sexysusie
    Member
    Posted 2 years ago #

    @chabis, the second line is also working.
    Which one is the best to use?

    And i have another qeustion.
    The invoice and delivery note are exact the same.
    Now i want no prices on the delivery note, but only on the invoice.
    What can i do?

  25. piffpaffpuff
    Member
    Plugin Author

    Posted 2 years ago #

    great to hear! i will update the plugin soon. use the second line until then.

    you need to create a custom template. read the faq: http://wordpress.org/extend/plugins/woocommerce-delivery-notes/faq/

    btw: please create the next time a new topic, because your issue is completely off-topic here.

  26. sexysusie
    Member
    Posted 2 years ago #

    @chabis,

    Ok thanks.
    Sorry fore that, next time i open an new topic.

  27. Ryan
    Member
    Posted 2 years ago #

    it breaks the <insert into post>.... deactivating for now.

  28. alvbayu
    Member
    Posted 2 years ago #

    Ryan : "it breaks the <insert into post>.... deactivating for now."

    @Ryan
    But the changelog says :

    Version 1.2.2 (2012-05-08)
    ---------------------------
    FIX:
    The media management button "Insert into Post" is now visible again. It was hidden by a the css.

  29. ula schmied
    Member
    Posted 2 years ago #

    Hi.
    I'm using print invoice for woocommerce because I need my invoices with sequential order number.

    I add an extra field in billing information. Is the DNI. Beacuse I need fiscal information.
    But when I see the invoice doesn't appear this extra field.

    ┬┐Any of us know how to make this new field appears in the invoice?

    Thanks for your time.
    Ula

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce Print Invoice & Delivery Note
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic