Results 1 to 10 of 15

Hybrid View

  1. #1
    Join Date
    Jan 2013
    Location
    Utah
    Posts
    20
    Plugin Contributions
    0

    Default Re: One time charge to be combined with total

    I would hope for both if at all possible. I also wonder would invoices and emails show it separate or together? I'd need it to be together on all of it.

    If combining it is not an option, would there be a way to label the one time fee to show the attribute name next to it or something. Maybe have attribute name to the left of the $ amount

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: One time charge to be combined with total

    It might make more sense to show the two seperate under the Unit Price then the combination under the Total Price ...

    You can edit the file:
    /includes/modules/pages/shopping_cart/header_php.php

    with these changes or fool with them and see what you get changing from:

    Code:
      $productsPriceEach = $currencies->format($ppe) . ($products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->display_price($products[$i]['onetime_charges'], zen_get_tax_rate($products[$i]['tax_class_id']), 1) : '');
      $productsPriceTotal = $currencies->format($ppt) . ($products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->display_price($products[$i]['onetime_charges'], zen_get_tax_rate($products[$i]['tax_class_id']), 1) : '');
      $buttonUpdate = ((SHOW_SHOPPING_CART_UPDATE == 1 or SHOW_SHOPPING_CART_UPDATE == 3) ? zen_image_submit(ICON_IMAGE_UPDATE, ICON_UPDATE_ALT) : '') . zen_draw_hidden_field('products_id[]', $products[$i]['id']);
    to be:
    Code:
      $productsPriceEach = $currencies->format($ppe) . ($products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->display_price($products[$i]['onetime_charges'], zen_get_tax_rate($products[$i]['tax_class_id']), 1) : '');
      $pp_onetime = zen_round(zen_add_tax($products[$i]['onetime_charges'], zen_get_tax_rate($products[$i]['tax_class_id'])), $currencies->get_decimal_places($_SESSION['currency']));
      $pp_total_all = $pp_onetime + $ppt;
    //  $productsPriceTotal = $currencies->format($ppt) . ($products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->display_price($products[$i]['onetime_charges'], zen_get_tax_rate($products[$i]['tax_class_id']), 1) : '');
      $productsPriceTotal = $currencies->format($pp_total_all);
      $buttonUpdate = ((SHOW_SHOPPING_CART_UPDATE == 1 or SHOW_SHOPPING_CART_UPDATE == 3) ? zen_image_submit(ICON_IMAGE_UPDATE, ICON_UPDATE_ALT) : '') . zen_draw_hidden_field('products_id[]', $products[$i]['id']);
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Jan 2013
    Location
    Utah
    Posts
    20
    Plugin Contributions
    0

    Default Re: One time charge to be combined with total

    Thank so much. That works great. For future readers of this post, the code above combined the right hand column, total and one time charge into one.

    That still leaves 2 lines under the column on the left called unit, and I can live with that. However it would be ideal to possibly label it somehow so it shows what that bottom price is all about. For example, there are 2 instances that I have one time charge. One charge is if they request a proof, and other is if they request us to create the design. If possibly, is there a way to show on the left of the onetime charge what that charge is. (maybe insert an attributes name)

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: One time charge to be combined with total

    As a guess, what if you change:
    Code:
      $productsPriceEach = $currencies->format($ppe) . ($products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->display_price($products[$i]['onetime_charges'], zen_get_tax_rate($products[$i]['tax_class_id']), 1) : '');
    to read:
    Code:
      $productsPriceEach = $currencies->format($ppe) . ($products[$i]['onetime_charges'] != 0 ? '<br />one time:<br />' . $currencies->display_price($products[$i]['onetime_charges'], zen_get_tax_rate($products[$i]['tax_class_id']), 1) : '');
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Jan 2013
    Location
    Utah
    Posts
    20
    Plugin Contributions
    0

    Default Re: One time charge to be combined with total

    Perfect! Ajeh you are awesome.

    Here's a solution for future Zeners...
    I've made 1 minor change to the code. Existing code listed above inserts text between the two lines. To make the text appear as a label, and to position it on the left (in front) of the dollar amount simply remove "br" code that comes after your text, and it will keep it in the same line. In the image attached I've customized the text to apply for both design services, and for proofs since those are my only "one time" charges per product. Depending on your products, just change it to whatever you like.
    Click image for larger version. 

Name:	one time charge 2.jpg 
Views:	98 
Size:	27.1 KB 
ID:	12975
    Last edited by Dalmen; 27 Aug 2013 at 07:50 PM.

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: One time charge to be combined with total

    Thanks for the update that this is now working for you as you needed it ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  7. #7
    Join Date
    Jan 2013
    Location
    Utah
    Posts
    20
    Plugin Contributions
    0

    Default Re: One time charge to be combined with total

    I'm trying to plug in "each:" in front of the top line, but wherever i insert it, I'm getting an error. Any suggestion where would i insert that? Thanks.
    (Example on image attached)
    Click image for larger version. 

Name:	one time charge 3.jpg 
Views:	85 
Size:	49.4 KB 
ID:	12976

 

 

Similar Threads

  1. Attributes with a discount and one-time charge
    By rbuswell in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 27 Oct 2011, 05:41 PM
  2. One time charge
    By Tool Pusher in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 9 Feb 2010, 03:32 AM
  3. Need one time charge with Product Attribute Grid
    By jalaco in forum Setting Up Categories, Products, Attributes
    Replies: 5
    Last Post: 30 Apr 2008, 04:33 AM
  4. Using "One time charge" with attributes
    By hiddink in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 16 May 2006, 09:06 AM

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