Bonnet
Bonnet
Offline
0
Hi,
Following my last post about this subject, from which i have not still received a satisfactory response from JoomlaThat suport !
i've investigated the php code provided in these plugins

  • plg_invoicemanager_hikashop_2.2.3_3.x
  • plg_search_hikashop_2.0.0_2.5

And what i found in these ones confirms the bad behaviour i reported in my last post.
Summary:
After having ordered from HikaShop, the {desc} token is evaluated to the product name while it should be evalutaed to the product description.
Here is an extract of file "invoicemanager.php" from the plugin " plg_invoicemanager_hikashop_2.2.3_3.x" :

...
foreach($products as $product){

$product_exists = 0 ;

if($must_update){
$query = " SELECT id FROM #__invoices_items WHERE invoice_id = '".$invoice_id."' AND external_type = '".$component."' AND product_id = ".$product->product_id;
$db->setQuery($query);
$product_exists = $db->loadResult();
}

$product_id = $product_exists ;

if($product->order_product_price > 0) $thetax = round(( $product->order_product_tax / $product->order_product_price ) * 100, $this->params->get('roundtax', 2)) ;
else $thetax = 0 ;

$items[] = array(
"id" => $product_id,
"sku" => $product->order_product_code,
"name" => strip_tags($product->order_product_name),
"desc" => strip_tags($product->order_product_name),
"value" => $product->order_product_price,
"amount" => $product->order_product_quantity,
"tax" => $thetax ,
"tax_id" => $this->params->get('tax_id', 0),
"external_type" => $component,
"product_id" => $product->product_id,
);

}
...


As i reported in my last post, the product description should be retreived from the "xxxx_hikashop_product" table, not from the "xxx_hikashop_order_product". The "product_id" from table "xxx_hikashop_order_product" should be used as a foreign key for that.
To fix this bug, this requires to modify the php code of the queries in file "hikashop.php", included in the plugin named "plg_search_hikashop_2.0.0_2.5", and this requires also to update the file "hikashop.php" which is embedded in the plugin "plg_invoicemanager_hikashop_2.2.3_3.x"

Can we hope you plan this ?

Furtheremore, the conditional block that sets the tax to 0 when the product price is 0 is a bad idea.
When a product have a unit-price of 0,00, the subtotal will be 0.00, whatever the tax is. There is no need to display a tax of 0% in the invoice.

These are not insignificant bugs.
While these will not be fixed, the invoices produced from HikaShop orders will stay not "professional"

Thanks

Accepted Answer

Bonnet
Bonnet
Offline
Tuesday, August 28 2018, 02:54 PM - #Permalink
0
Hi Germinal,
ouf !!!
Thanks very much for your update.
The {desc} tokens of the product ITEM areas expand now well to the product description when an order is passed from HikaShop.
The reply is currently minimized Show
Responses (5)
  • Accepted Answer

    Tuesday, August 28 2018, 10:57 AM - #Permalink
    0
    hello!

    yes, exactly. what you need requires simply to make an extra DB query to pull this field (desc) from the products table.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, August 28 2018, 11:04 AM - #Permalink
    0
    I have just uploaded version 2.2.4 of the hikashop plugin, which pulls the products description from DB as you requested.
    The reply is currently minimized Show
  • Accepted Answer

    Bonnet
    Bonnet
    Offline
    Tuesday, August 28 2018, 11:14 AM - #Permalink
    0
    Thanks to reply,
    I know this is not a confortable position to manage the customer reports and that it's better spend time to fix the bugs instead of chatting with the clients. Ive a long experience in hardware and embedded software developping.
    But as every customer, we simply need to know if you plan to fix the issues reported and when we can benefit from the updates.
    If you annouce a date, i think i'll be more serene.
    Thanks
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, August 28 2018, 11:15 AM - #Permalink
    0
    hi

    did you read my last message?
    The reply is currently minimized Show
  • Accepted Answer

    Bonnet
    Bonnet
    Offline
    Tuesday, August 28 2018, 11:20 AM - #Permalink
    0
    Ah, ok, now i've read it
    The reply is currently minimized Show
Your Reply