[Skip to main content](#vessel-content)

#   Vendor number of items is including characteristic

##

- **[tomhika](/forum/user/5228-tomhika "View tomhika's Profile")**
- [![tomhika's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/beer.png)](/forum/user/5228-tomhika "View tomhika's Profile") Topic Author
- [ Offline](/forum/user/5228-tomhika)

Less More

- Posts: 110
- Thank you received: 6
-
-

11 years 8 months ago [\#195226](#195226) by [tomhika](/forum/user/5228-tomhika "View tomhika's Profile")  *[Vendor number of items is including characteristic](/forum/23-market-how-to/875765-vendor-number-of-items-is-including-characteristic#195226 "-- HikaShop version -- : 2.4.0 -- HikaMarket version -- : 1.6.1 -- Joomla version -- : 3.4 -- PHP version -- : 5.4  On the vendor control panel under &quot;total products&quot; 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 &quot;total product&quot; under the vendor's panel will show 16 products instead of 4  How can I make it show just 4?  thank you.")* was created by *[tomhika](/forum/user/5228-tomhika "View tomhika's Profile")*

-- 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.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODc1NzY1LXZlbmRvci1udW1iZXItb2YtaXRlbXMtaXMtaW5jbHVkaW5nLWNoYXJhY3RlcmlzdGljP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

11 years 8 months ago [\#195249](#195249) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Vendor number of items is including characteristic](/forum/23-market-how-to/875765-vendor-number-of-items-is-including-characteristic#195249 "-- HikaShop version -- : 2.4.0 -- HikaMarket version -- : 1.6.1 -- Joomla version -- : 3.4 -- PHP version -- : 5.4  On the vendor control panel under &quot;total products&quot; 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 &quot;total product&quot; under the vendor's panel will show 16 products instead of 4  How can I make it show just 4?  thank you.")*

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

'filters' =&gt; array( 'product_published' =&gt; 'product.product_published = 1', 'product_vendor_id' =&gt; ('product.product_vendor_id = ' . (int)$vendor_id) )

By Code:

'filters' =&gt; array( 'product_published' =&gt; 'product.product_published = 1', 'product_type' =&gt; 'product.product_type = ' . $this-&gt;db-&gt;Quote('main'), 'product_vendor_id' =&gt; ('product.product_vendor_id = ' . (int)$vendor_id) )

I think I will integrate this modification into HIkaMarket.

Regards,

---

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

The following user(s) said Thank You: [tomhika](/forum/user/5228-tomhika "View tomhika's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODc1NzY1LXZlbmRvci1udW1iZXItb2YtaXRlbXMtaXMtaW5jbHVkaW5nLWNoYXJhY3RlcmlzdGljP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[tomhika](/forum/user/5228-tomhika "View tomhika's Profile")**
- [![tomhika's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/beer.png)](/forum/user/5228-tomhika "View tomhika's Profile") Topic Author
- [ Offline](/forum/user/5228-tomhika)

Less More

- Posts: 110
- Thank you received: 6
-
-

11 years 8 months ago [\#195265](#195265) by [tomhika](/forum/user/5228-tomhika "View tomhika's Profile")  Replied by *[tomhika](/forum/user/5228-tomhika "View tomhika's Profile")* on topic *[Vendor number of items is including characteristic](/forum/23-market-how-to/875765-vendor-number-of-items-is-including-characteristic#195265 "-- HikaShop version -- : 2.4.0 -- HikaMarket version -- : 1.6.1 -- Joomla version -- : 3.4 -- PHP version -- : 5.4  On the vendor control panel under &quot;total products&quot; 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 &quot;total product&quot; under the vendor's panel will show 16 products instead of 4  How can I make it show just 4?  thank you.")*

Thank you again Jerome, Yes that was it.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODc1NzY1LXZlbmRvci1udW1iZXItb2YtaXRlbXMtaXMtaW5jbHVkaW5nLWNoYXJhY3RlcmlzdGljP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

Moderators: [Obsidev](/forum/user/7040-obsidev "View Obsidev's Profile")

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.059 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
