show cutomtext (custom field) in front-end product page

  • Posts: 138
  • Thank you received: 4
7 years 3 months ago #286769

-- HikaShop version -- : 3.2.1

hi,
I want use custom field (type = customtext) for heading in front-end product page (specification)
but dont show it .
how customize code for do it ?
*note : I do not use text field instead of customtext for one reason. Because, in text field when I add default value and set readonly .dont show in front-end .
please see attach


Joomla Developer | am.ebrahimzadeh[at]gmail.com
Attachments:
Last edit: 7 years 3 months ago by aminweb.

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

  • Posts: 83778
  • Thank you received: 13565
  • MODERATOR
7 years 3 months ago #286771

You could create a custom fields of the table "item" and of the type "custom text" for that.
I don't understand why you want to use coding instead ?
If you want to add that with code, you would have to edit the file "show_block_custom_item.php" via the menu Display>views.

The following user(s) said Thank You: aminweb

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

  • Posts: 138
  • Thank you received: 4
7 years 3 months ago #286849

Thanks for your guide, but this was not my request
please see attach image in fist post.
I want seperate beetwen custom field in front-end.how do it?


Joomla Developer | am.ebrahimzadeh[at]gmail.com

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

  • Posts: 83778
  • Thank you received: 13565
  • MODERATOR
7 years 3 months ago #286859

Hi,

I saw your screenshot already.
Unfortunately, your new message doesn't give any new information so I can't see what I can say besides what I already said.
If it's not your request, please reexplain with more information what you want to do. And maybe why a custom text custom field wouldn't do it ? And why a customization of the view wouldn't do it ?

The following user(s) said Thank You: aminweb

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

  • Posts: 138
  • Thank you received: 4
7 years 3 months ago #287191

thanks nicolas,
I will explain again.
I want to group custom fields.
for Ex:
I have a mobile web store.
I want to put in custom fields in the specifications section.
I want to put fields in groups(simillar head ).For example: CPU group - Display group - Camera group - Accessory group
Below each group, I also have custom fields.


I decided to use the custom text field for groups for the groups.
please help me , how do it?


Joomla Developer | am.ebrahimzadeh[at]gmail.com

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

  • Posts: 83778
  • Thank you received: 13565
  • MODERATOR
7 years 3 months ago #287254

Hi,

You need to create a custom field of the type "custom text" for each group header and enter the name of the group in the "custom text" field of the custom field.
Then, make sure that you order it just before the fields of that group.
Then it will display similarily to the screenshot in your first message.

The following user(s) said Thank You: aminweb

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

  • Posts: 138
  • Thank you received: 4
7 years 3 months ago #287261

thanks nicolas,
I do it, but dont show custom field of the type "custom text".
custom text create in which one table? product or item?
thanks


Joomla Developer | am.ebrahimzadeh[at]gmail.com

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

  • Posts: 83778
  • Thank you received: 13565
  • MODERATOR
7 years 3 months ago #287269

Hi,

How are your other custom fields configured ?
If they are custom item fields, then you want to use a custom field of the table "item" and it will work fine on the product page on the frontend.
If they are custom product fields, then you can't use a custom text custom field because they only display on the form (where you can fill in the fields), and thus only show on the backend product edition page. So in that case, the only solution would be to edit the file "show_block_custom_main.php" via the menu Display>views to add the display of the custom text custom fields.

The following user(s) said Thank You: aminweb

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

  • Posts: 138
  • Thank you received: 4
7 years 3 months ago #287321

hi nicolas.thanks for reply
I config custom product fields.
now how to edit show_block_custom_main.php ? which line edit? pleeease help.so thanks


Joomla Developer | am.ebrahimzadeh[at]gmail.com

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

  • Posts: 83778
  • Thank you received: 13565
  • MODERATOR
7 years 3 months ago #287325

Hi,

Well, ti's quite easy. You just add such code after the foreach line:
if($fieldName=='XXX') echo '<tr><td>YYY</td></tr>';
where XXX is the column name of the first field of the group and YYY the text you want to display before the group.

The following user(s) said Thank You: aminweb

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

Time to create page: 0.076 seconds
Powered by Kunena Forum