custom field in cart

  • Posts: 37
  • Thank you received: 0
10 years 1 month ago #199129

-- HikaShop version -- : 2.3.4
-- Joomla version -- : 3.4.1

cart.php :blink:

please tell me what code to insert in cart.php to display the field value of the goods ?

There is a mandatory value that should be visible in the shopping cart.
If possible, this code could be used in the module of the basket.

Thank you.

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

  • Posts: 26235
  • Thank you received: 4036
  • MODERATOR
10 years 1 month ago #199149

Hi,

The view is "product | cart" but it will be difficult to give you some code without knowing exactly what you want to display.
Dealing with the custom field can be difficult depending what you want to achieve ; and depending the kind of custom field (product / item) the code will be very different.

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: 37
  • Thank you received: 0
10 years 1 month ago #199177

this

<td data-title="<?php echo JText::_('CART_PRODUCT_UNIT_PRICE'); ?>" class="hikashop_cart_product_price_value">
<?php
$this->row=&$row;
$this->unit=true;
echo $this->loadTemplate();
?>

replace

<?php
if(!empty($this->fields)){
$this->setLayout('show_block_custom_main');
echo $this->loadTemplate();
}
?>

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

  • Posts: 83831
  • Thank you received: 13572
  • MODERATOR
10 years 1 month ago #199183

Hi,

You didn't say what custom field you want to display.
Let's suppose that you're talking about a custom product field.
In that case, it's really easy. Just add such code:
<?php echo $row->column; ?>

where column should be replaced with the column name of your custom product field.

The following user(s) said Thank You: Vorov

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

  • Posts: 37
  • Thank you received: 0
10 years 1 month ago #199254

Super, everything works fine, thanks!

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

Time to create page: 0.059 seconds
Powered by Kunena Forum