Results 1 to 10 of 10
  1. #1
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    1,943
    Plugin Contributions
    1

    Default Invoice.PHP 156 vs 154

    Is there any downside to using the v154 invoice.php in v156? that is going to or might cause an OOPS down the road? Or security issue?

    While the 156c version looks nice on the screen and I'm sure someone took a lot of time and trouble to change the format, but it takes twice the amount of space on the printed page. A 3/4 page invoice now takes 2 sheets of paper, so I have replaced the 156 invoice.php with 154 invoice.php but don't want to leave it there if it is going to cause headache in the future.

    While it is not within my wheelhouse to begin editing the invoice appearance, that is one thing our customers complain about is being so cluttered with information that is needless or useless to them. An example being their name and address printed 3 times on the page and 4 columns of prices.

    Thanks,
    Rick
    ChainWeavers (dot) com

  2. #2
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    7,164
    Plugin Contributions
    269

    Default Re: Invoice.PHP 156 vs 154

    I don't see a difference. Did you customize 1.5.4? Perhaps tweak the print styles?
    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.

  3. #3
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    7,164
    Plugin Contributions
    269

    Default Re: Invoice.PHP 156 vs 154

    PS> I have never been wild about 4 columns of prices either. Maybe we can make that switchable in the future.
    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.

  4. #4
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    1,943
    Plugin Contributions
    1

    Default Re: Invoice.PHP 156 vs 154

    Quote Originally Posted by swguy View Post
    I don't see a difference. Did you customize 1.5.4? Perhaps tweak the print styles?
    No edits on my part. There is a huge difference in the files from the 154 distribution and the 156 distribution. Printing a single line product may not be significant. A product with 2 or more attributes is a huge difference. 156 puts a blank line after each product and draws a line between products.

    In 154, 2 products with 2 attributes each, prints in the same amount of paper as a single product with 2 attributes in 156 invoice.php

    I don't think the forum will allow me to attach the 2 distribution files so that you don't have to go find them.
    Rick
    ChainWeavers (dot) com

  5. #5
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    1,943
    Plugin Contributions
    1

    Default Re: Invoice.PHP 156 vs 154

    Quote Originally Posted by swguy View Post
    PS> I have never been wild about 4 columns of prices either. Maybe we can make that switchable in the future.
    Some might need to see CUSTOMER, SOLD TO and SHIP TO but in our small world, the paper used to just print the CUSTOMER when it is duplicated, in most cases, twice below it.

    Having all admins capable of logging in is more important to remedy than an inch of paper.
    Rick
    ChainWeavers (dot) com

  6. #6
    Join Date
    Apr 2006
    Location
    West Salem, IL
    Posts
    2,570
    Plugin Contributions
    0

    Default Re: Invoice.PHP 156 vs 154

    CUSTOMER, SOLD TO and SHIP TO
    The CUSTOMER portion in both 1.5.4 and 1.5.6c is only shown when either of two conditions are met. If billing name and delivery name are different or the billing street address and delivery street address are different
    Code:
    $show_customer = false;
    if ($order->billing['name'] != $order->delivery['name']) {
      $show_customer = true;
    }
    if ($order->billing['street_address'] != $order->delivery['street_address']) {
      $show_customer = true;
    }
    Mike
    GeekHost - Zen Cart Certified & PCI Compliant Hosting
    The Zen Cart Forum...Better than a monitor covered with post-it notes!

  7. #7
    Join Date
    Apr 2006
    Location
    West Salem, IL
    Posts
    2,570
    Plugin Contributions
    0

    Default Re: Invoice.PHP 156 vs 154

    I played with the invoice in developer tools in the browser and most of the extra spacing you are seeing in the 1.5.6c version is padding or margin-bottom. So you could play around to figure out which paddings/margins you need to set to 0 to collapse the line items in the invoice to make it fit better when printing and put those rules in the admin/includes/stylesheet_print.css to only apply those adjustments for the print job.
    Mike
    GeekHost - Zen Cart Certified & PCI Compliant Hosting
    The Zen Cart Forum...Better than a monitor covered with post-it notes!

  8. #8
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    1,943
    Plugin Contributions
    1

    Default Re: Invoice.PHP 156 vs 154

    Quote Originally Posted by barco57 View Post
    The CUSTOMER portion in both 1.5.4 and 1.5.6c is only shown when either of two conditions are met. If billing name and delivery name are different or the billing street address and delivery street address are different
    Code:
    $show_customer = false;
    if ($order->billing['name'] != $order->delivery['name']) {
      $show_customer = true;
    }
    if ($order->billing['street_address'] != $order->delivery['street_address']) {
      $show_customer = true;
    }

    TNX Mike, I'll have a look... probably after I get all the admin logins resolved.

    My first example is an order where Customer and Sold to names and addresses are identical. Ship to is effectively identical but has the word street spelled out for the shipto and abbreviated for the Customer and Sold to. All 3 are on the printed page.

    Thank you for the references to areas to 'play with'. That is very helpful for a non-coder, like me.
    Last edited by RixStix; 1 Apr 2020 at 09:15 PM. Reason: typo
    Rick
    ChainWeavers (dot) com

  9. #9
    Join Date
    Apr 2006
    Location
    West Salem, IL
    Posts
    2,570
    Plugin Contributions
    0

    Default Re: Invoice.PHP 156 vs 154

    Quote Originally Posted by RixStix View Post
    Ship to is effectively identical but has the word street spelled out for the shipto and abbreviated for the Customer and Sold to. All 3 are on the printed page.
    "effectively identical" and "actually identical" are different things and would satisfy the if and setting $show_customer = true
    Mike
    GeekHost - Zen Cart Certified & PCI Compliant Hosting
    The Zen Cart Forum...Better than a monitor covered with post-it notes!

  10. #10
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    1,943
    Plugin Contributions
    1

    Default Re: Invoice.PHP 156 vs 154

    TNX. I understand after you explained the logic.
    Rick
    ChainWeavers (dot) com

 

 

Similar Threads

  1. v156 Upgrading v155 ti 156 - stuck on "Admin Credentials"
    By BikeDealer in forum Upgrading to 1.5.x
    Replies: 18
    Last Post: 10 Jun 2019, 03:20 PM
  2. Make orders.php Invoice button print invoice rather than display it
    By dinki in forum Contribution-Writing Guidelines
    Replies: 0
    Last Post: 28 Sep 2009, 03:28 PM
  3. Replies: 1
    Last Post: 9 Sep 2009, 12:11 PM
  4. orders.php and invoice.php modification.
    By StevenB in forum General Questions
    Replies: 0
    Last Post: 8 Jul 2007, 11:59 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