how to output default and custom field in view override?

  • Posts: 57
  • Thank you received: 0
6 years 8 months ago #275663

-- HikaShop version -- : 3.1.1

HI

I want to output default fields like product name, item price, total price etc... and custom fields in different views override.

what is the code to output any fields in a view?
how to check where name? I was told to use debug print to find out their name, but what is debug print?

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

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
6 years 8 months ago #275670

Hi,

There doesn't exist any generic code to output any field in a random view.
The code you can use to display a field of something will vary based on what is that something and in which view you want to display it.
So since I don't know where these "fields" come from and where you want to display them, I can't provide any useful information.
For example, you're talking about the "total price". But the total price of what ? A cart ? A wishlist ? An order ? Something else ? And where do you want to display it ? Which view exactly ?
Without that information I can't even say if what you want to do is possible.

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

  • Posts: 57
  • Thank you received: 0
6 years 8 months ago #275835

Since different fields and views have different codes to output in view, can you write some documents with common examples for it so that users can learn how to do this?

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
6 years 8 months ago #275842

Hello,

I'm sorry but that's not possible.
What you're asking is a course on PHP/Joomla/HikaShop development.

To access a field you first need to know what you want to access and how you will find the information (like an ID).
You can perform a SQL Query to look directly in the database or you can use the Core tools to get an internal object (like getFullOrder or the HikaShop order class, etc).
Then you will be able to access your data and afterwards you need to display it depending how you want to display it and format it.

So if you have a precise question on HikaShop we can see to answer to it but if you want help to perform important customization in your HikaShop I'm afraid that I will have to tell you the same thing that we told you several times by email:

Please note that customization is not part of our support. For such customization questions, please go through our partners.


Thank you for your understanding.


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: 57
  • Thank you received: 0
6 years 8 months ago #275886

thanks for the reply. Yes, I know customisation is not supported. I just have a very tiny issue about serial status data translation that may be too simple for a customsation project from your partner.

in the view of HikaSerial - orderserial / show_order_front_show.php, I added below line to show the serial status. it works, but it shows the DB data like "used" or "assigned" directly.
echo '<div align="center">'.$data->serial_status.'</div>';

I want to output the translated ver of the serial status in my langauge. just like the serial status output in backend > serial list page.
www.screencast.com/t/PtbejpEQ6t

I know how JText::_("") work for label, but don't know how it works for data in DB like the serial status. if can you give me the sample code for below case, I can handle all the rest issue like this. thanks.
echo '<div align="center">'.$data->serial_status.'</div>';

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
6 years 8 months ago #275932

Hello,

I'm sorry but your question is not related to HIkaShop but to HikaSerial.
And I'm afraid that I don't see the link between your original question and the question you are posting right now.

If you have a question regarding HikaSerial ; please use the HikaSerial section of the forum.

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.

Time to create page: 0.065 seconds
Powered by Kunena Forum