Page 3 of 3 FirstFirst 123
Results 21 to 25 of 25
  1. #21
    Join Date
    Nov 2008
    Posts
    46
    Plugin Contributions
    0

    Default Re: Multiple products with fixed quantity pricing

    Gawd this is so frustrating !!! I'm sure the answer is stupidly simple but I'm blowed if I can see it.

    What is most odd is that the correct Tax figure is shown on the payment method page and is set in the variable $order->info[tax_groups] - where it gets that from I cannot see at the minute. But when it tries to look for the tax for calculation of the Total it get a big fat zero.

    As an experiment I tryed to set Config My Store Display Prices with Tax. At first it would not show a price inc. Tax so I updated the Product whereupon it showed it which cured that problem. However I still got

    Sub Total : 250
    Tax : 50
    Total : 250

    That is completely wrong as well and I'm not sure exactly how this should be displayed, but I think it is symptomatic of the problem. If the product is displayed with Tax then this should be a different layout.

    e.g with 20% VAT :

    Goods : 240
    Goods : 120
    SubTotal : 360
    Shipping : 48
    Total : 408
    (Tax : 88)

    I have just put in a clean installation with the exiting database (i.e NO mods to the files whatsoeer apart from configure information) and the results are still the same.

    Guess the next thing to try a a completely clean install :-(

    Yours in desperation :-)

    John

  2. #22
    Join Date
    Nov 2008
    Posts
    46
    Plugin Contributions
    0

    Default Re: Multiple products with fixed quantity pricing

    OK,

    After a frustrating day I *think* there is something not quite right in the tax calculations in order.php :


    In includes/classes/order.php around line 503 +

    $shown_price = (zen_add_tax($this->products[$index]['final_price'] * $this->products[$index]['qty'], $this->products[$index]['tax']))
    + zen_add_tax($this->products[$index]['onetime_charges'], $this->products[$index]['tax']);
    = zen_add_tax (1.75 * 100, 0 + 0, 0)

    I think this is wrong as function zen_add_tax($price, $tax) only wants two parts.....

    Next, I can't describe this bit too well so bear with me ! I think that the variable ($this->products ['index'] ['tax_groups'] - how do you extract a sub/sub/sub array value ???) should be used somehow (in this instance UK VAT)

    This is the result of the $this array at this point :

    products Array [1]
    0 Array [16]
    qty (int) 100
    name (string:17) 38mm Button Badge
    model (string:6) 338253
    tax (int) 0
    tax_groups Array [1]
    ***** UK VAT (double) 20 ***** Here ??
    tax_description (string:6) UK VAT
    price (string:6) 1.7500
    final_price (double) 1.75
    onetime_charges (int) 0
    weight (int) 0
    products_priced_by_attribute (string:1) 0
    product_is_free (string:1) 0
    products_discount_type (string:1) 2
    products_discount_type_from (string:1) 0
    id (int) 222
    rowClass (string:7) rowEven

    Or possibly $taxRates

    $taxRates Array [1]
    UK VAT (double) 20

    Not quite sure how - I put a couple of test lines as follows :

    $my_rate_name = $this->products[$index]['tax_description'];
    $my_rate = $taxRates[$my_rate_name];

    $my_rate becomes outputs : (double) 20

    But at least it's the right number.....

    Not sure where to go from here. Any suggestions please ???

    B. Rgds
    John

  3. #23
    Join Date
    Nov 2008
    Posts
    46
    Plugin Contributions
    0

    Default Re: Multiple products with fixed quantity pricing

    Or it could be that it isn't getting the right tax from here at Line 434 :

    $taxRates = zen_get_multiple_tax_rates($products[$i]['tax_class_id'], $tax_address->fields['entry_country_id'], $tax_address->fields['entry_zone_id']);

    Can see that the product tax class id = 1, country id = 222, zone id = 0

    Will check later or tomorrow.

  4. #24
    Join Date
    Nov 2008
    Posts
    46
    Plugin Contributions
    0

    Default Re: Multiple products with fixed quantity pricing

    Well,

    Just whacked in a clean install of 1.3.9.h with no demo data. Added One product.

    There were a pile of Zones which I left (the UK was not one)

    Deleted out any Zone definitions.

    One Tax Rate with Class Taxable Goods, no zone, rate of 20%, priority 1

    Works a treat.

    Just overwritten this installation with the files from the original installation (e.g. copied from ZenCart to ZenCart_test)

    Looks odd when I pick the new template, but it still works. Imported some products again. Still works !

    So there must be something in the database that is screwed but I can't see it.

    My guess is the only thing I can do is install a clean database and import various bits from the existing database.

    Anyone got any other thoughts on what may be wrong in the old database ?

    B. Rgds
    John

  5. #25
    Join Date
    Nov 2008
    Posts
    46
    Plugin Contributions
    0

    Default Re: Multiple products with fixed quantity pricing

    Test site is here :

    http://home.reetspetit.net/testbay/Z...test/index.php

    New database. Copied over all files to this installation. Then just imported some products.

    Don't get it at ALL !!!

    Must be one tiny setting that is messing the whole thing. If anyone can point me in the right direction to save a complete reinstalltion, I'd be VERY grateful !

    B. Rgds
    John

 

 
Page 3 of 3 FirstFirst 123

Similar Threads

  1. Quantity discount with multiple products 1.3.9h
    By scotto9 in forum General Questions
    Replies: 2
    Last Post: 27 Dec 2010, 11:24 PM
  2. products-multiple downloads, with individual attribute pricing
    By pushpull in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 17 Aug 2008, 03:06 AM
  3. FIXED Muliple Quantities at FIXED Prices per Multiple Quantity???
    By awarrior in forum Setting Up Categories, Products, Attributes
    Replies: 5
    Last Post: 4 Apr 2007, 09:42 PM

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