state format issue

  • Posts: 490
  • Thank you received: 2
7 years 3 months ago #256410

-- HikaShop version -- : 2.6.3
-- HikaMarket version -- : 1.7.0
-- Joomla version -- : 3.4.5
-- PHP version -- : 5.5
-- Error-message(debug-mod must be tuned on) -- : none

hi

for the vendors listing, the state is displayed with Id and other details.

this is what i see state_Sumatera_Utara_1773.

how do we remove the unnecessary details thanks?

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

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
7 years 3 months ago #256411

Hi,

I'm sorry but I am not able to understand what you're talking about.
Please provide more details and a screenshot.

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: 490
  • Thank you received: 2
7 years 3 months ago #256575

hi jerome

please see the screen shot.

the state has the id on it



the correct one should say

JAwa Barat and Sumatera Utara.

these are states in indonesia

you can also see the form which displays the correct one.



howt to correct this?

Attachments:
Last edit: 7 years 3 months ago by ronron.

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

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
7 years 3 months ago #256612

Hi,

Can you please add the line

$fieldsClass->handleZoneListing($displayFields['vendor'], $rows);
at the end of the function listing of the file "components/com_hikamarket/views/vendormarket/view.html.php".
It will process the "zone" custom field to let them have the human readable 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.

  • Posts: 490
  • Thank you received: 2
7 years 3 months ago #256680

thank you

can you tell me where exactly to add it?

code removed

thanks again

Last edit: 7 years 3 months ago by Jerome. Reason: code removed

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

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
7 years 3 months ago #256712

Hi,

Please do not paste view content in the forum.
You can be sure that, as the developer of HikaMarket I already have all the view content.

Like I wrote

at the end of the function listing of the file "components/com_hikamarket/views/vendormarket/view.html.php".

And at the end of that specific function in that specific file, you will find the line :
$this->assignRef('displayFields', $displayFields);
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: 490
  • Thank you received: 2
7 years 3 months ago #256755

sorry about that.

anyway i dont have that information. tha last one on my file located at

../public_html/components/com_hikamarket/views/vendormarket/view.html.php

is this one

$this->assignRef('extraFields', $extraFields);
		$this->assignRef('vendorFields', $vendorFields); 
              
	}  
}

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

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
7 years 3 months ago #256757

Hi,

Yes, it's the right place.
I have to guess that the line I gave you is a new line added for the next release. My bad.

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: 490
  • Thank you received: 2
7 years 3 months ago #256921

hi jerome

i did not work.

i already added the code but nothing has changed, the state is still not displayed correctly.

thanks

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

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
7 years 3 months ago #256942

Hi,

Please use instead

$fieldsClass->handleZoneListing($extraFields['vendor'], $rows);
because if you do not have patches for displayFields, the processing on that variable won't do anything on your fields.

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

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

  • Posts: 490
  • Thank you received: 2
7 years 3 months ago #256985

it worked perfectly.

but what do you mean by patches?

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

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
7 years 3 months ago #257026

Hi,

I mean that you're using HikaMarket 1.7.2 and in my local website I have never version of HikaMarket (which do not have a release number yet).
But you can be sure that the improvement will be include in the next release.

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

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

  • Posts: 490
  • Thank you received: 2
7 years 3 months ago #257143

hi

it only works for the vendor page

on my product listing page which is show_tabular.php the result is still unformated.

the code i used to display the zone is

echo $this->element->vendor->vendor_address_state;

thanks

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

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
7 years 3 months ago #257151

Hi,

Yes the patch I gave you is just for the vendor page.
If you want to display vendor details in the product page, it will require some extra code if you want to format and display correctly the fields.

$fieldsClass = hikashop_get('class.field');
$vendor_fields = $fieldsClass->getFields('display:vendor_page=1',  $this->element->vendor, 'plg.hikamarket.vendor')
/* ... */
echo $fieldsClass->show($vendor_fields['vendor_address_state'], $this->element->vendor->vendor_address_state);

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

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

  • Posts: 490
  • Thank you received: 2
7 years 3 months ago #257180

working code for the product view

     $fieldsClass = hikashop_get('class.field');
     $vendor_fields = $fieldsClass->getFields('display:vendor_page=1', $this->element->vendor, 'plg.hikamarket.vendor');
    
     $fieldsClass->handleZoneListing($extraFields['vendor'], $rows);
     echo $fieldsClass->show($vendor_fields['vendor_address_state'], $this->element->vendor->vendor_address_state);
      

thanks you jerome

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

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
7 years 3 months ago #257214

Hi,

There is need of the "handleZoneListing", the " /* ... */ " I placed was mostly to indicate that the last line could be paste further.
But I posted all the needed code in my message.

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

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

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