- Posts: 64
- Thank you received: 0
How to apply Order user price level at backend?
- irfanhanfi
-
Topic Author
- Offline
Less
More
12 years 2 months ago #164631
by irfanhanfi
How to apply Order user price level at backend? was created by irfanhanfi
-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3.0
I was thinking that at the backend product price applies as per the order user group but it looks it is not true.It also not depend on the user who is editing that order.Could you please help me how to solve this?
I have made some changes but not sure if this would affect something else.
I have made below changes in admin/com_hikashop/views/order/view.html.php inside function edit_products
Thanks,
Irfan
-- Joomla version -- : 3.3.0
I was thinking that at the backend product price applies as per the order user group but it looks it is not true.It also not depend on the user who is editing that order.Could you please help me how to solve this?
I have made some changes but not sure if this would affect something else.
I have made below changes in admin/com_hikashop/views/order/view.html.php inside function edit_products
Code:
//commented by Irfan
//$currencyClass->getPrices($rows, $product_id, $currency_id, $main_currency, $zone_id, $discount_before_tax);
//added by Irfan,note:order user group price in hikashop
//product_add:order controller
if(!empty($product_id)){
JArrayHelper::toInteger($product_ids);
$database = JFactory::getDBO();
$query = 'SELECT * FROM '.hikashop_table('product').' WHERE product_id IN ('.$product_id[0].')';
$database->setQuery($query);
$rows = $database->loadObjectList();
}
$currencyClass->getPrices($rows, $product_id, $currency_id, $main_currency, $zone_id, $discount_before_tax,$order->order_user_id);
//End by Irfan
Thanks,
Irfan
Please Log in or Create an account to join the conversation.
12 years 2 months ago #164699
by nicolas
Replied by nicolas on topic How to apply Order user price level at backend?
Hi,
Filling the user_id is indeed a good idea. However I don't see the point of the other code to set the $rows variable since it's already set with the product data like this:
Do you have a case where this doesn't work ?
Filling the user_id is indeed a good idea. However I don't see the point of the other code to set the $rows variable since it's already set with the product data like this:
Code:
$rows = array($product);
if($isVariant){
$rows[]=$allproducts[ (int)$product_id[1] ];
}
Please Log in or Create an account to join the conversation.
- irfanhanfi
-
Topic Author
- Offline
Less
More
- Posts: 64
- Thank you received: 0
12 years 2 months ago #164704
by irfanhanfi
Replied by irfanhanfi on topic How to apply Order user price level at backend?
Actually the case where I had the issue, when there is no price(free) for order user.It selects one of the price(I am not sure what is the algorithm it uses) and it reduces the same price in VAT even vat is not applied to that product.For example-For user A no price is applicable that is zero(or free).So when we add it through backend it sets price 25(this is the first price in the price list) and Vat -25.So the price will be zero but calculation is odd.In the system vat is set to 5% for canada and this order is for Russia.
I hope I make my point clear.Any suggestion for this case?
Thanks,
I hope I make my point clear.Any suggestion for this case?
Thanks,
Please Log in or Create an account to join the conversation.
12 years 2 weeks ago #171952
by Xavier
Replied by Xavier on topic How to apply Order user price level at backend?
Hi,
Do you have solved your issue about this ?
Do you have solved your issue about this ?
Please Log in or Create an account to join the conversation.
- irfanhanfi
-
Topic Author
- Offline
Less
More
- Posts: 64
- Thank you received: 0
12 years 2 weeks ago #172034
by irfanhanfi
Replied by irfanhanfi on topic How to apply Order user price level at backend?
Yes,I have used the same code as I posted above.And so far it is working fine.
Regards,
Regards,
Please Log in or Create an account to join the conversation.
Time to create page: 0.244 seconds