- Posts: 110
- Thank you received: 6
Vendor number of items is including characteristic
11 years 6 months ago #195226
by tomhika
Vendor number of items is including characteristic was created by tomhika
-- HikaShop version -- : 2.4.0
-- HikaMarket version -- : 1.6.1
-- Joomla version -- : 3.4
-- PHP version -- : 5.4
On the vendor control panel under "total products" the vendor see a number that reflects not the actual items but the total number of different characteristics.
For example, vendor has 4 shirts and each has 4 sizes, S, M, L, XL. The "total product" under the vendor's panel will show 16 products instead of 4
How can I make it show just 4?
thank you.
-- HikaMarket version -- : 1.6.1
-- Joomla version -- : 3.4
-- PHP version -- : 5.4
On the vendor control panel under "total products" the vendor see a number that reflects not the actual items but the total number of different characteristics.
For example, vendor has 4 shirts and each has 4 sizes, S, M, L, XL. The "total product" under the vendor's panel will show 16 products instead of 4
How can I make it show just 4?
thank you.
Please Log in or Create an account to join the conversation.
11 years 6 months ago #195249
by Jerome
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.
Replied by Jerome on topic Vendor number of items is including characteristic
Hi,
In the file "administrator/components/com_hikamarket/classes/statistics.php" you will find the different "requests" that HikaMarket can perform for the statistics in the control panel.
The first one (products_count) in the "getVendor" function is the request which count the number of products.
The idea is to add a filter to just count the products with the" product_type = 'main' ":
Replacing:
By
I think I will integrate this modification into HIkaMarket.
Regards,
In the file "administrator/components/com_hikamarket/classes/statistics.php" you will find the different "requests" that HikaMarket can perform for the statistics in the control panel.
The first one (products_count) in the "getVendor" function is the request which count the number of products.
The idea is to add a filter to just count the products with the" product_type = 'main' ":
Replacing:
Code:
'filters' => array(
'product_published' => 'product.product_published = 1',
'product_vendor_id' => ('product.product_vendor_id = ' . (int)$vendor_id)
)
Code:
'filters' => array(
'product_published' => 'product.product_published = 1',
'product_type' => 'product.product_type = ' . $this->db->Quote('main'),
'product_vendor_id' => ('product.product_vendor_id = ' . (int)$vendor_id)
)
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: tomhika
Please Log in or Create an account to join the conversation.
11 years 6 months ago #195265
by tomhika
Replied by tomhika on topic Vendor number of items is including characteristic
Thank you again Jerome, Yes that was it.
Please Log in or Create an account to join the conversation.
Moderators: Obsidev
Time to create page: 0.202 seconds