Skip to main content

Dislplay custom field on cart page

More
8 years 8 months ago #286013 by info@vesica.org
-- HikaShop version -- : 3.2.2

Hi,

how can I pull from the database a custom field value to diplay it on the cart page(cart/show.php)?

For example on product listing page I do it with this code: $this->row->product_column_name.

thanks!

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

More
8 years 8 months ago #286016 by Mohamed Thelji
Hello,

It will actually depends on how you have set the "Table" option, if you custom field is part of the "Product" table it should already be displayed.
Else, you'll have to directly do a database request to load and display its value.

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

More
8 years 8 months ago #286080 by info@vesica.org
Hi,

yes it is part of the product table. It's an Ajax image field. The field label is displayed but the value not. I prefer to not do a new database query if it is not needed.

thanks!

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

More
8 years 8 months ago #286083 by nicolas
Hi,

Here is a thread which talks about that:
www.hikashop.com/forum/development/88397...tom-field-image.html
Note that in cart / show.php the product variable is $cart_product and not $this->element or $this->row

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

Time to create page: 0.213 seconds
Powered by Kunena Forum