- Posts: 490
- Thank you received: 2
Question about vendor listing
-- HikaMarket version -- : 1.7.0
-- Joomla version -- : 3.4.5
-- PHP version -- : 5.5
-- Error-message(debug-mod must be tuned on) -- : none
hi
i created a hikamarket vendor listing menu. MY problem is that it displays all users even do they have not posted anything. i think it has something to do with my setting to simplified registration with password and vendor automatic creation.
is there a way not to display vendors who just registered and has not actually posted anything? or maybe not to display vendors who has not completed certain fields?
thanks
Please Log in or Create an account to join the conversation.
Sorry for the delay.
I needed to performed some tests in order to be sure of my answer.
I understand your request and it could be something interesting to put in HikaMarket.
Creating a dynamic filter in order to check the vendor completion will be a little bit complicated.
For the products, it requires to add a link with the hikashop product table.
In HikaMarket, you have a trigger for the vendor listing :
www.hikashop.com/support/documentation/1...VendorListingDisplay
So thanks to a custom plugin, you can add your own filters and you can modify dynamically the query which will be processed by HikaMarket.
In the parameter $sql_params, you can add a SQL join for the product table.
But if you want to only display the vendor with products, it will require to perform an "HAVING" in the SQL query and currently, there is no parameter for that (so we need to add it).
In the file "components/com_hikamarket/views/vendormarket/view.html.php"
Replacing:
And
And finally
Then it will be possible in the plugin to modify "join" to like with the HikaShop table products, "select" to get the count of products and "having" to only get vendor with products.
And it should do the trick !
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.
i have been trying this but i cant move forward.
i always get this error
Warning
JInstaller: :Install: Can't find Joomla XML setup file.
×
Error
Unable to find install package
i attached the plugin i created, maybe you can point me to the right direction?
thank you
Please log in or register to see it.
Please Log in or Create an account to join the conversation.
Your XML is malformed, the header contains special characters instead of classical double quotes for the version parameter :
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.
i got it to install but having this error
what could it be?
thanks
Please Log in or Create an account to join the conversation.
Please replace the line
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.
the error is gone but no vendor is displaying even do vendors have products.
thanks so much
Please Log in or Create an account to join the conversation.
I'm sorry but if I run the query in PHPMyAdmin
I right code my vendors with products.
So please check that query in your end and you can see to perform a display of the SQL query just before his processing to check that you're having the same content.
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.
i tested this but it only displayed one vendor. it shows the main vendor
i tried to change WHERE (vendor_published = 1) to WHERE (vendor_published = 0) just to test it and it displayed the first vendor that is unpublished.
i dont know if it makes sense but it always displays the first vendor in the table
i tried to change hkp.product_type = 'main' to hkp.product_type = 'main categories' because i changed my category from main to main category but it still displays the main vendor which happens to be the first vendor in the table. One difference from setting 'main' to 'main category' is the vendor_products. for 'main' = 28 for 'main category' = 0.
what else could i check?
thanks
Please Log in or Create an account to join the conversation.
I'm sorry but I don't understand what you're trying to do.
In my side, the query is working perfectly and I got the list of published vendor with published products.
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.
first of all thank you for your patience.
to make things clear please let me explain.
i changed the file components/com_hikamarket/views/vendormarket/view.html.php and it is attached here.
i created the plugin with the following codes
unfortunately its not working on my end.
it is only displaying one vendor
what i am requesting is to display vendors with products only
thanks
Please Log in or Create an account to join the conversation.
Try to perform a "group by" on the vendor id to avoid another kind of aggregation.
Then you will be able to push "vendor.vendor_id" in the group_by ; to get a query like that
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.
again thank you
its working now but with a little bug. the plugin is now able to display all vendors that are with products. the only problem is when you choose to navigate using pagination.
when you use pagination and select the button to go to the last part of the record. what happens is everything or all records disappears.
please check this link link
i modified the plugin contents to this
and the screenshot below
Please Log in or Create an account to join the conversation.
Sure the pagination cannot work properly because of :
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.
i still cant get this to work.
can you tell me what the code should be?
i already tried to add $order but still dosnt work.
thank you for your patience.
Please Log in or Create an account to join the conversation.
Like I wrote you, the pagination is handle by the query I mentioned.
That query do not include the filtering on the products, it does not have the "HAVING" clause and because the having need a value from the "select" and you can't add all "select" fields to perform the "count" ; we got a situation.
If you find a solution to perform a query without needed the "HAVING" clause but just with a "INNER JOIN" (and maybe a sub queyr), it would do the trick.
By I'm afraid that I can't modify more HikaMarket and I think that I'll remove the "having" support due to the issue with the pagination.
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.