Page 1 of 2 12 LastLast
Results 1 to 10 of 44

Hybrid View

  1. #1
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,684
    Plugin Contributions
    123

    Default Catalog Invoice Support Thread

    Catalog Invoice allows your customers to create their own invoices from past orders on their My Account page.

    https://www.zen-cart.com/downloads.php?do=file&id=2111
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  2. #2
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,263
    Plugin Contributions
    3

    Default Re: Catalog Invoice Support Thread

    Scott... the FUNCTIONS file... invoice_functions.php

    ... is configured to return MM/DD/YY

    Here in the UK, we read the date as DD/MM/YY

    What changes need to happen with this code to render date as DD/MM/YY ?

    PHP Code:
    <?php
      
    // Functions for catalog side invoice

    if (!function_exists('zen_datetime_short')) {
      function 
    zen_datetime_short($raw_datetime) {
        if ( (
    $raw_datetime == '0001-01-01 00:00:00') || ($raw_datetime == '') ) return false;

        
    $year = (int)substr($raw_datetime04);
        
    $month = (int)substr($raw_datetime52);
        
    $day = (int)substr($raw_datetime82);
        
    $hour = (int)substr($raw_datetime112);
        
    $minute = (int)substr($raw_datetime142);
        
    $second = (int)substr($raw_datetime172);

        return 
    strftime(DATE_TIME_FORMATmktime($hour$minute$second$month$day$year));
      }
    }
    Additionally - and for interest's sake, I added a JS print function to the end of the main invoice.php file

    At the bottom:

    PHP Code:
    <!-- body_text_eof //-->

    <br

    PHP Code:
    <!-- body_text_eof //-->

    <br /><p><button onclick="printFunction()">Print This Page</button><script>function printFunction(){window.print();}</script></p> 
    ... allows customers to PRINT by clicking the button.

    PS: The <br> tag needs closing, surely? <br />
    20 years a Zencart User

  3. #3
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,684
    Plugin Contributions
    123

    Default Re: Catalog Invoice Support Thread

    Quote Originally Posted by schoolboy View Post
    Scott... the FUNCTIONS file... invoice_functions.php

    ... is configured to return MM/DD/YY

    Here in the UK, we read the date as DD/MM/YY

    What changes need to happen with this code to render date as DD/MM/YY ?
    Modify DATE_TIME_FORMAT in includes/languages/<YOUR_TEMPLATE>/english.php
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  4. #4
    Join Date
    Apr 2007
    Posts
    17
    Plugin Contributions
    0

    Default Re: Catalog Invoice Support Thread

    First of all thank you for this add-on. I've installed the add-on as instructed but I get a file not found message when I click on the invoice button. Any ideas why?

  5. #5
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,684
    Plugin Contributions
    123

    Default Re: Catalog Invoice Support Thread

    Check each of the files in includes and make sure they have in fact uploaded correctly.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  6. #6
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,684
    Plugin Contributions
    123

    Default Re: Catalog Invoice Support Thread

    Version 1.1 has been uploaded, adding the invoice to the account history page (previously it was just on the my account page).
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  7. #7
    Join Date
    Sep 2006
    Posts
    163
    Plugin Contributions
    1

    Default Re: Catalog Invoice Support Thread

    Quote Originally Posted by swguy View Post
    Catalog Invoice allows your customers to create their own invoices from past orders on their My Account page
    Is there a way to change the invoice link in the email sent out to the customer so that it uses this new invoice page?

    At present it goes to the entirely unsatisfactory account history page.

    I think the change has to go into classes/order.php somewhere a bit after line 1000 but I'm not sure what or where

  8. #8
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,684
    Plugin Contributions
    123

    Default Re: Catalog Invoice Support Thread

    In includes/classes/order.php look for the line saying

    EMAIL_TEXT_INVOICE_URL . ' ' . zen_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $zf_insert_id, 'SSL', false) . "\n\n";

    it's on line 1069 in 1.5.7c. Just adjust that to point to FILENAME_INVOICE instead.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  9. #9
    Join Date
    Sep 2006
    Posts
    163
    Plugin Contributions
    1

    Default Re: Catalog Invoice Support Thread

    Quote Originally Posted by swguy View Post
    In includes/classes/order.php look for the line saying

    EMAIL_TEXT_INVOICE_URL . ' ' . zen_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $zf_insert_id, 'SSL', false) . "\n\n";

    it's on line 1069 in 1.5.7c. Just adjust that to point to FILENAME_INVOICE instead.
    Sadly, that's one of the things I'd tried (and failed with) before asking.

    It generates a link to [siteurl]/index.php?main_page=invoice&oID=123456 instead of to [siteurl]/invoice.php&oID=123456

  10. #10
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,684
    Plugin Contributions
    123

    Default Re: Catalog Invoice Support Thread

    Yep, you're right.

    Instead of
    zen_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $zf_insert_id, 'SSL', false)

    use something like

    HTTPS_SERVER . DIR_WS_CATALOG . 'invoice.php?order_id='.$zf_insert_id
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Hebrew Support - latest release [Support Thread]
    By eranariel in forum Addon Language Packs
    Replies: 19
    Last Post: 23 Jan 2023, 08:04 AM
  2. v150 Product Images on Invoice, Email, etc [Support Thread]
    By jackie.taferner in forum All Other Contributions/Addons
    Replies: 29
    Last Post: 26 Aug 2022, 05:52 AM
  3. Invoice-to-PDF Mailer [support thread]
    By hayden in forum All Other Contributions/Addons
    Replies: 39
    Last Post: 17 Sep 2013, 10:10 AM
  4. SnapShot [support thread]
    By skipwater in forum All Other Contributions/Addons
    Replies: 32
    Last Post: 26 Oct 2012, 08:38 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR