osCmax v2.5 User Manual
Results 1 to 5 of 5

Tax is lost at checkout if product weight is zero

This is a discussion on Tax is lost at checkout if product weight is zero within the osCMax v1.7 Installation forums, part of the osCmax v1.7 Forums category; I don't want to update each product with a weight as shipping will be free/included in the price, but I ...

      
  1. #1
    Member
    Join Date
    Aug 2003
    Location
    Southampton UK
    Posts
    63
    Rep Power
    0


    Default Tax is lost at checkout if product weight is zero

    I don't want to update each product with a weight as shipping will be free/included in the price, but I am finding that the products are being determined as 'virtual' in class shopping_cart, the shopping_cart page is therefore bypassing the delivery page (checkout_shipping), and the tax is lost:
    in class order when called from checkout_payment
    tax_address[entry_country_id] = null
    tax_address[entry_zone_id] = null

    but they are correct (222 and 1 respectively) if the product has a weight.

  2. #2
    Member
    Join Date
    Aug 2003
    Location
    Southampton UK
    Posts
    63
    Rep Power
    0


    Default

    The problem seems to start class order when it is called from checkout_payment
    Code:
          $tax_address_query = tep_db_query("select ab.entry_country_id, ab.entry_zone_id from " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) where ab.customers_id = '" . (int)$customer_id . "' and ab.address_book_id = '" . (int)($this->content_type == 'virtual' ? $billto : $sendto) . "'");
          $tax_address = tep_db_fetch_array($tax_address_query);
    In the above sql ab.address_book_id returns as 6 when called from checkout_shipping but is 0 when called from checkout_payment.

    The result of ($this->content_type == 'virtual' ? $billto : $sendto) is 6 when called from checkout_shipping and is empty when called from checkout_payment.

    checkout_shipping
    ---------------------
    billto: 6
    sendto: 6
    this->content_type: virtual_weight
    products_tax: 17.5

    checkout_payment
    ---------------------
    billto: 6
    sendto:
    this->content_type: virtual_weight
    products_tax: 0

    So the sendto id is being lost!

    In checkout_shipping $sendto = $customer_default_address_id but it is not set in checkout_payment. Checkout_shipping offers an address selection, so if that page is bypassed surely in checkout_payment if $sendto is empty it should be set to:
    Code:
    $sendto = $customer_default_address_id;
    [/code]

  3. #3
    Anonymous
    Guest


    Default Same for me

    Hi,
    I am VERY interested to know if you find the way to fix your problem, as I have the same one and I a looking for the fix for 2 days, looking at the code.
    Is there any erlation with the weight of the product ?
    Thanks so much if you can help me,
    Philippe

  4. #4
    Member
    Join Date
    Aug 2003
    Location
    Southampton UK
    Posts
    63
    Rep Power
    0


    Default

    In checkout_payment.php around line 68 and before the line '$order = new order;' I inserted the following line:
    if ($sendto == '') {$sendto = $customer_default_address_id;}

  5. #5
    Anonymous
    Guest


    Default

    Thanks for your reply, this can be a bypass. I will give it a try.
    Philippe

Similar Threads

  1. Downloadable product error on checkout
    By robfor in forum osCMax v2 Features Discussion
    Replies: 2
    Last Post: 05-20-2006, 04:23 AM
  2. Product info lost after update
    By mgrooten in forum osCmax v1.7 Discussion
    Replies: 0
    Last Post: 08-06-2005, 12:59 PM
  3. Product weight
    By Kalpesh in forum osCommerce 2.2 Modification Help
    Replies: 0
    Last Post: 01-03-2005, 09:59 AM
  4. Best way of controlling (max one product at checkout)
    By Anonymous in forum osCmax v1.7 Discussion
    Replies: 2
    Last Post: 03-30-2004, 01:33 AM
  5. pricing tweks on product info page and checkout
    By cvc505 in forum osCommerce 2.2 Installation Help
    Replies: 0
    Last Post: 06-28-2003, 05:01 AM

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
  •