Page 3 of 3 FirstFirst 123
Results 21 to 27 of 27
  1. #21
    Join Date
    Aug 2009
    Posts
    128
    Plugin Contributions
    0

    Default Re: Bug: price manager adds Tax to the promotional price! Help needed...

    Great that you can fix it.. I really did not understand how to change the code, when you are able could you please tell me the code to change?

    Thank you

  2. #22
    Join Date
    Aug 2009
    Posts
    128
    Plugin Contributions
    0

    Default Re: Bug: price manager adds Tax to the promotional price! Help needed...

    Hi, do you have the code change to try to fix it?
    Sorry if I write again, but I'd need to sort this out to put online the store tomorrow or Tuesday.

    Thank you very much, I appreciate your help.

  3. #23
    Join Date
    Aug 2009
    Posts
    128
    Plugin Contributions
    0

    Default Re: Bug: price manager adds Tax to the promotional price! Help needed...

    Quote Originally Posted by mc12345678 View Post
    From the configuration and code so far provided I was thinking I may need to dig deeper into the issue; however, I was also thinking the same thing. It can be accomplished by modifying the code provided by moving the applicable or (||) and single quoted text from the one section of code to the other... So the one with checkout_confirmation being moved near the one with checkout_payment... (Not at a computer to more easily show the change.)
    Hi,

    I'm sorry to bother you again, but I feel that we were so close to reach the solution to the issue that I think it would a pity to leave all the work already done without any result...
    Last time you wrote it seemed you had the solution but you were not in front of the computer for the code...

    Do you have any news?

    Thank you very very much for you support.

  4. #24
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Bug: price manager adds Tax to the promotional price! Help needed...

    Quote Originally Posted by ilmarchez View Post
    Hi,

    I'm sorry to bother you again, but I feel that we were so close to reach the solution to the issue that I think it would a pity to leave all the work already done without any result...
    Last time you wrote it seemed you had the solution but you were not in front of the computer for the code...

    Do you have any news?

    Thank you very very much for you support.
    Been a long "week"... I *think* the following would/could apply:

    For the second file (the class file) that functions as the observer, listening and waiting for the primary code to take some form of action to which this will take action.
    Based on the above information the filename for this second file would still be class.whole_sale_taxes.php and stored in the directory: includes/classes/observers


    Code:
    <?php
    
    /**
     * Description of class.whole_sale_taxes: This class is used to support tax information related to the wholesale module.  This way reduces the modifications of the includes/modules/pages/checkout_payment/header_php.php and other files reached from that page to nearly nothing.
     *
     * @author mc12345678
     *
     */
    class whole_sale_taxes extends base {
    
      
      /*
       * This is the observer for the includes/modules/pages/checkout_payment/header_php.php file to support taxing everyone equally when the order is being processed at the end of the purchase.
       */
      function whole_sale_taxes() {
            global $zco_notifier;
            $zco_notifier->attach($this, array('NOTIFY_HEADER_START_CHECKOUT_PAYMENT', 'NOTIFY_ORDER_PROCESSING_ATTRIBUTES_BEGIN',  'NOTIFY_HEADER_START_CHECKOUT_SHIPPING', 'NOTIFY_HEADER_START_CHECKOUT_SUCCESS',  'NOTIFY_HEADER_START_CHECKOUT_SHIPPING_ADDRESS',  'NOTIFY_HEADER_START_CHECKOUT_PROCESS',  'NOTIFY_HEADER_START_CHECKOUT_PAYMENT_ADDRESS', 'NOTIFY_HEADER_START_CHECKOUT_CONFIRMATION',  'NOTIFY_HEADER_START_SHOPPING_CART',  'NOTIFY_HEADER_START_LOGIN')); 
        }    
    
      /*
       * Generic function that is activated when any notifier identified in the observer is called but is not found in one of the updated methods of calling an observer (ZC 1.5.3+) is encountered as a notifier.
       */
      function update(&$callingClass, $notifier, $paramsArray) {
        global $db;
        
        // remove the session variable that removes tax from the calculations.
        if ($notifier == 'NOTIFY_HEADER_START_CHECKOUT_PAYMENT' || $notifier == 'NOTIFY_HEADER_START_CHECKOUT_CONFIRMATION'){
          if ($_SESSION['customer_whole']=='1') {
            unset($_SESSION['customer_whole']);
            $_SESSION['customer_whole_reset']='1';
          }
        }
        // restore the tax "discount" so that the customer continues to see the untaxed price until returning to the above page(s).
        if ($notifier == 'NOTIFY_ORDER_PROCESSING_ATTRIBUTES_BEGIN' || $notifier == 'NOTIFY_HEADER_START_CHECKOUT_SHIPPING' || $notifier == 'NOTIFY_HEADER_START_CHECKOUT_SUCCESS' || $notifier == 'NOTIFY_HEADER_START_CHECKOUT_SHIPPING_ADDRESS' || $notifier == 'NOTIFY_HEADER_START_CHECKOUT_PROCESS' || $notifier == 'NOTIFY_HEADER_START_CHECKOUT_PAYMENT_ADDRESS' /*|| $notifier == 'NOTIFY_HEADER_START_CHECKOUT_CONFIRMATION'*/ || $notifier == 'NOTIFY_HEADER_START_SHOPPING_CART' || $notifier == 'NOTIFY_HEADER_START_LOGIN') {
          if ($_SESSION['customer_whole_reset']=='1') {
            unset($_SESSION['customer_whole_reset']);
            $_SESSION['customer_whole']='1'
          }
          
        }
    
        } //end update function - mc12345678
    } //end class - mc12345678
    
    ?>
    The first blue is required to try to present the information requested/desired (next step), the second blue between and including /* */ could be removed; however, I have left the code there for "understanding".

    Again, this is untested on my part, but fortunately was able to update it. I do not know if it will meet the requirements/expectations and the results of using it. Just a word of caution on my part.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #25
    Join Date
    Aug 2009
    Posts
    128
    Plugin Contributions
    0

    Default Re: Bug: price manager adds Tax to the promotional price! Help needed...

    Hi, thank you very much for your reply.

    I tried this out and now it works, it shows correct amounts during the entire checkout.

    Another issue came out:
    Totale amounts are not correct in these pages in the line grand total (should be VAT included instead it apppears VAT excluded):
    index.php?main_page=account
    index.php?main_page=account_history_info&order_id=XXXX
    admin/orders.php?origin=index&page=1&oID=XXXX&action=edit
    admin/index.php
    admin/orders.php?oID=XXXX&origin=index

    Even the email sent to the customer is VAT excluded as grand total.
    Is the solution easy?

    Thank you

  6. #26
    Join Date
    Sep 2008
    Location
    WA
    Posts
    555
    Plugin Contributions
    0

    Default Re: Bug: price manager adds Tax to the promotional price! Help needed...

    Did you ever figure out the last part?

    L

  7. #27
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Bug: price manager adds Tax to the promotional price! Help needed...

    There is a VAT mod or two in the plugins that I might suggest (may impact existing code), otherwise this is a bit of custom coding to accomplish. The results seen in these areas are primarily based on historical data as compared to instore live data. The email is generated in includes/classes/orders.php towards the bottom of the file and would need to include similar checks and changes based on the $_SESSION information and other variables. The above "fixes" were provided based on stop and see an issue/resolve it type basis having identified a "minor" issue. If I get more "free" time then I might be able to provide the changes, otherwise hopefully someone else can step in.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 
Page 3 of 3 FirstFirst 123

Similar Threads

  1. Replies: 2
    Last Post: 27 Jul 2015, 05:56 PM
  2. v150 Tax inclusive price same as tax exclusive price in admin invoice.
    By nigelt74 in forum Managing Customers and Orders
    Replies: 2
    Last Post: 22 May 2012, 01:46 PM
  3. Product Price Manager & Sales Tax
    By VGlide in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 9 Aug 2010, 09:51 PM
  4. Prices inc tax in admin price manager
    By nsanford in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 3
    Last Post: 12 Mar 2009, 12:09 AM
  5. Replies: 0
    Last Post: 26 Jun 2008, 01:29 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