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

#   Some vendor subzones not shown correctly

##

- **[wenglos](/forum/user/36058-wenglos "View wenglos's Profile")**
- [![wenglos's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/36058-wenglos "View wenglos's Profile") Topic Author
- [ Offline](/forum/user/36058-wenglos)

Less More

- Posts: 16
- Thank you received: 0
-
-

11 years 6 months ago [\#200800](#200800) by [wenglos](/forum/user/36058-wenglos "View wenglos's Profile")  *[Some vendor subzones not shown correctly](/forum/23-market-how-to/876791-some-vendor-subzones-not-shown-correctly#200800 "-- HikaShop version -- : 2.4.0 -- HikaMarket version -- : 1.6.2 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.3.29  Hello, on the vendor listing page, I need to show also Vendor's &quot;country&quot; and &quot;state&quot; fields (not only image and name).  I've added following code to listingcontent&#95;img&#95;title.php :  As you can see also in the screenshot, for &quot;country&quot; (Bratislava, Nitra, Zilina...) it works OK. But for &quot;state&quot;, which is the subzone of &quot;country&quot;, it works only for the first of the &quot;countries&quot; (Bratislava) and for the others there is just the internal identificator of the value shown.  Any idea what could be wrong here and how to fix it?  Thanks much.")* was created by *[wenglos](/forum/user/36058-wenglos "View wenglos's Profile")*

-- HikaShop version -- : 2.4.0
-- HikaMarket version -- : 1.6.2
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.3.29

Hello,
on the vendor listing page, I need to show also Vendor's "country" and "state" fields (not only image and name).

I've added following code to listingcontent_img_title.php : Code:

echo $this-&gt;fieldsClass-&gt;show($this-&gt;extraFields['vendor']['vendor_address_country'],$this-&gt;row-&gt;vendor_address_country); echo ' / '; echo $this-&gt;fieldsClass-&gt;show($this-&gt;extraFields['vendor']['vendor_address_state'],$this-&gt;row-&gt;vendor_address_state);

As you can see also in the screenshot, for "country" (Bratislava, Nitra, Zilina...) it works OK.
But for "state", which is the subzone of "country", it works only for the first of the "countries" (Bratislava) and for the others there is just the internal identificator of the value shown.

Any idea what could be wrong here and how to fix it?

Thanks much.

- [ ![treneri.png](/forum/attachment/24254) ](/forum/attachment/24254 "treneri.png") [ ](/forum/attachment/24254?download=1 "treneri.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODc2NzkxLXNvbWUtdmVuZG9yLXN1YnpvbmVzLW5vdC1zaG93bi1jb3JyZWN0bHk/dG1wbD1tYXJrZG93bg==) 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 6 months ago [\#200802](#200802) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Some vendor subzones not shown correctly](/forum/23-market-how-to/876791-some-vendor-subzones-not-shown-correctly#200802 "-- HikaShop version -- : 2.4.0 -- HikaMarket version -- : 1.6.2 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.3.29  Hello, on the vendor listing page, I need to show also Vendor's &quot;country&quot; and &quot;state&quot; fields (not only image and name).  I've added following code to listingcontent&#95;img&#95;title.php :  As you can see also in the screenshot, for &quot;country&quot; (Bratislava, Nitra, Zilina...) it works OK. But for &quot;state&quot;, which is the subzone of &quot;country&quot;, it works only for the first of the &quot;countries&quot; (Bratislava) and for the others there is just the internal identificator of the value shown.  Any idea what could be wrong here and how to fix it?  Thanks much.")*

Hi,

Yes, it's almost logical.

The zone custom fields require to load the zone data to display correctly the state.
By default, HikaShop will just load the states of the default country zone ; so if you have a listing with zone from different countries, you have to force the loading of the state zones.

You can see the function "handleZone" in the file "administrator/components/com_hikashop/classes/field.php" which is used to load the addresses zones. You have also the function "handleZoneListing" which is quite similar.
I think that you should call the handleZone for your vendors so it will load the missing state elements which are missing in the cache.
Like we do, for example, in the listing of users : Code:

$fieldsClass-&gt;handleZoneListing($fields, $rows);

(where $fields are the custom fields and $rows are the list of elements).

Regards,

---

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

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODc2NzkxLXNvbWUtdmVuZG9yLXN1YnpvbmVzLW5vdC1zaG93bi1jb3JyZWN0bHk/dG1wbD1tYXJrZG93bg==) 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.039 seconds

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