Vendor commission invoice

  • Posts: 43
  • Thank you received: 0
9 years 2 months ago #214837

-- HikaShop version -- : 2.5.0
-- HikaMarket version -- : 1.6.5
-- Joomla version -- : 3.4.4

Hi,

I have a set-up with vendor paid directly and where we generate and send the invoice for the commission when the vendor changes order status to 'confirmed'. When selecting vendor and generating invoice, the vendor first receives an 'order creation' email and then an 'order confirmed' email (along the PDF invoice).

Two questions:

Is it possible to have only the 'order confirmed' e-mail going out with the PDF invoice - i.e. not send 'order created' regarding vendor commission.

Is it possible to have the vendors billing address auto-loading when the commission order is generated. Currently, I have to select the customer and then click 'set user address' manually.

Thanks,
David

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 2 months ago #214842

Hi,

1/ In the HikaMarket configuration you have a setting for that, it is called "Order notification status filter".
www.hikashop.com/support/documentation/1...ml#config_main_email
There you can select all order status which will send an email to the vendors. If the field is empty, all statuses will be used.

2/ When the vendor is paid directly, the "commission order" generated is a HikaShop "sale" order.
In that case, HikaMarket set the "order_billing_address_id" with the address of the vendor, thanks to that line (in the HikaMarket vendor class)

$order->order_billing_address_id = $this->getAddressId($vendor);
That function should return an address ID which corresponds to the vendor address (regarding his vendor settings).
In your case, it looks like you want to link that to the vendor administrator default address and not to the address configured for the vendor ; I am right ?

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: 43
  • Thank you received: 0
9 years 2 months ago #214873

Hi again,

1) The ideal method would be to have different 'Order notification status filter' for normal orders and commission 'orders'.

2) For the address - no address is added in the process at all (see screenshot). And I'm looking for the vendor address according to the vendor setting and not the administrator default address. To generate the address, I have to click customer, reselect the same customer, and and set 'Set user addresses' to 'Yes'.

Regards,
David

Attachments:

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 2 months ago #214879

Hi,

1/ But.. The commission order is not a "subsale" or something attached to the vendor.
The setting "order notification status filter" is just for the vendor notification.
I'm afraid that I don't understand your request.

2/ If you select the same user and check "set user addresses" ; you are using the vendor adminsitrator default address and not the vendor address.
The vendor address that you can find for example, in the backend, under the "description" :
www.hikashop.com/support/documentation/1...ket-vendor-form.html

I'll perform some tests in my side but please provide me details which will show me that your configuration is right according to what you want to do.

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: 43
  • Thank you received: 0
9 years 2 months ago #214914

Hi,

With the current setup, vendor address and vendor administrator address are the same (as I can see in the vendor page and the user page).

The issue is that neither address is added as you can see in the previous screenshot. So, the choice is either adding the vendor address manually in the Billing Address fields or re-selecting the customer and setting Set User Address to yes.

Regards,

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 2 months ago #214954

Hi,

Please edit the file "administrator/components/com_hikamarket/classes/vendor.php" and replace

		if(empty($status)) {
			$addressClass = hikamarket::get('shop.class.address');
			$status = $addressClass->save($address);
		}
By
		if(empty($status)) {
			$address->address_user_id = (int)$vendor->vendor_admin_id;
			$addressClass = hikamarket::get('shop.class.address');
			$status = $addressClass->save($address, 1);
		}
It will force the "address_user_id" in the address object and also force the save by avoiding some HikaShop checks.

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: DavidThor

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

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