Skip to main content

Access the Product Id?

14 years 2 months ago #62876 by Mountainstumble
Hi, I hope you can help.

I have written a module which is to be included in Hikashop product page by using {loadposition xxxx}. This all works fine so far but I could do with retrieving some specific product data from a custom field I have added in the admin tool. However, to do this I need to know the product id that the module is being displayed in so I can make the relevant database calls.

Can anyone tell me how I can retrieve the current product id for the page that is being displayed?

Thanks in advance,

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

14 years 2 months ago #62969 by Xavier
Replied by Xavier on topic Re: Access the Product Id?
Hi

To retrieve the product id of the displayed page, you can use "hikashop_getCID('product_id');" or "$this->element->product_id".
You can see the view "product / show_default" to see how retrieve the product id.
The following user(s) said Thank You: Mountainstumble

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

10 years 2 weeks ago #252604 by SuX
Replied by SuX on topic Access the Product Id?
I got an error becuase I tried to import a Column: Shape, Weight, Lab, Treatment...etc...
How can I import these column or create custom_id?

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

10 years 2 weeks ago #252637 by nicolas
Replied by nicolas on topic Access the Product Id?
Hi,

You can create new custom fields of the table "product" via the menu Display>Custom fields if you have the Essential or the Business edition.

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

Time to create page: 0.071 seconds
Powered by Kunena Forum