Adding Order from Backend => Vendor not credited

  • Posts: 78
  • Thank you received: 4
  • Hikamarket Multivendor Hikashop Business
10 years 5 months ago #161092

-- url of the page with the problem -- : mywebsite.com/mypage
-- HikaShop version -- : 2.3.1
-- Joomla version -- : 2.5
-- PHP version -- : x.x.x
-- Browser(s) name and version -- : XXXXX x.x.x
-- Error-message(debug-mod must be tuned on) -- : Error_message

Hikamarket 1.4.1,

When adding an additional order to an existing order from the backend, the vendor is not credited. No vendor fee is added to the vendor in hikamarket. The product that is added has a percent rate for the vendor.
I also see the vendor and his vendor fee when adding the order manually in the backend. However, the listed amount is not credited to the vendor.

PS: In the new fee system I see 3 field. Flat rate, Fixed fee and Percentage. Whats the difference fixed fee and flat rate ?

Please Log in or Create an account to join the conversation.

  • Posts: 26156
  • Thank you received: 4028
  • MODERATOR
10 years 5 months ago #161105

Hi,

When you added the product in the backend, did you selected a vendor ?
Did you set a vendor price ?

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 78
  • Thank you received: 4
  • Hikamarket Multivendor Hikashop Business
10 years 5 months ago #161134

Yes, vendor is listed in the form as well the vendor price
See herea screenshot:
screencast.com/t/a7CzdX5tkH

and here the result: Vendor is missing:
screencast.com/t/AWk7tHVOKH

Regards

Please Log in or Create an account to join the conversation.

  • Posts: 26156
  • Thank you received: 4028
  • MODERATOR
10 years 5 months ago #161138

Hi,

I reproduce the problem in my local website.
In the file "administrator/components/com_hikamarket/classes/order.php" please replace

				$query = 'UPDATE ' . hikamarket::table('shop.order_product') .
						' SET order_product_parent_id = ' . (int)$product->order_product_parent_id.', order_product_vendor_price = ' . (float)$product->order_product_vendor_price .
						' WHERE order_product_id = ' . $product->order_product_id;
By
				$query = 'UPDATE ' . hikamarket::table('shop.order_product') .
						' SET order_product_parent_id = ' . (int)$product->order_product_parent_id.', order_product_vendor_price = ' . (float)$product->order_product_vendor_price;

				if(!empty($product->order_product_id))
					$query .= ' WHERE order_product_id = ' . $product->order_product_id;
				else
					$query .= ' WHERE order_id = ' . (int)$product->order_id . ' AND product_id = ' . (int)$product->product_id . ' AND order_product_price = ' . (float)hikamarket::toFloat($product->order_product_price);
It will force the update of the order product even if the "order_product_id" is not available.

But I have to notice that your screenshots are a little bit weird.
In the first one, the price is "100" and in the second the price is "200".
About the fields, I see in the first one than a required field is empty, so the HikaShop save should not be possible with the custom field check.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 78
  • Thank you received: 4
  • Hikamarket Multivendor Hikashop Business
10 years 5 months ago #161144

Hi,

Thanks. Will test it.
I tried several times with different amounts. Therefore you saw 100 and 200.
But the product id was available.
About the custom fields. I also guess this is an error in hikashop. For this product, no custom fields are defined. If I add it via backend, alsways the custom fields are appearing even they are not needed. It also lets me save without filling in the mandatory fields.
When I add the same product in the frontend, the custom fields are never listed for the product.
Could you check this also, why it always add these custom fields when adding a product from the backend ?
Regards

Please Log in or Create an account to join the conversation.

  • Posts: 78
  • Thank you received: 4
  • Hikamarket Multivendor Hikashop Business
10 years 5 months ago #161149

Hi again,

Tested it.
Does not work. It now adds it to the hikamarket order but the vendor total price is still 0.-
See here:
screencast.com/t/ekaevCk7q

Please Log in or Create an account to join the conversation.

  • Posts: 26156
  • Thank you received: 4028
  • MODERATOR
10 years 5 months ago #161159

Hi,

It could come from the fact that the vendor is prefilled but not passed in the form.
I have to do more investigations about it but here a fix for the class order (same file than previous).
Replacing

$vendor = $vendorObj->vendor_id . ' - ' . $vendorObj->vendor_name;
By:
$vendor = $vendorObj->vendor_id . ' - ' . $vendorObj->vendor_name . '<input type="hidden" name="data[market][product][order_product_vendor_id]" value="'.$vendorObj->vendor_id.'"/>';
It will force the information of the order_product_vendor_id and create the new suborder for the right vendor.
With my latest tests, I specified manually the vendor id using a generic product, that's why I didn't see it.

For the custom field problem, I guess you have some "item custom fields" only accessible in the backend or linked to a specific category.
When you edit products in the backend, HikaShop can't know fro where category the product come from (sometime from any category) so all fields are displayed. But removing the "required" could be useful, I think.
I will see to pass this information to the rest of the HikaShop team.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 78
  • Thank you received: 4
  • Hikamarket Multivendor Hikashop Business
10 years 4 months ago #161367

Hi,

Thank you. Now it works.
Will this be also added in the next version of hikashop or do I have to add it again after the next upgrade ?

Thanks and br

Please Log in or Create an account to join the conversation.

  • Posts: 26156
  • Thank you received: 4028
  • MODERATOR
10 years 4 months ago #161377

Hi,

It will be integrated in the next HikaMarket release, like all bug fix we made through the forum.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: tgdkere2

Please Log in or Create an account to join the conversation.

Moderators: Obsidev
Time to create page: 0.071 seconds
Powered by Kunena Forum