[solved] hide/show product_code in cart

  • Posts: 101
  • Thank you received: 12
11 years 5 months ago #106787

Hi,

In product / cart.php there is this piece of code:

<?php echo $row->product_name; ?>
	<?php if ($this->config->get('show_code')) { ?>
		<span class="hikashop_product_code_cart"><?php echo $row->product_code; ?></span>
	<?php } ?>

I wanted to hide the product_name and just show the product_code and I see:
if ($this->config->get('show_code'))

Is there a option to hide/show the product_code in the cart?

I have looked in System -> Configuration -> Main -> Cart and also in the other tabs but can't seem to find where you can hide/show the code.
Also in the "Parameters for products" in the Cart Module I don't see a parameter to show or hide the product_code.

If there is such a parameter I don't need to remove the if-structure.

Last edit: 11 years 5 months ago by SG.

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

  • Posts: 2334
  • Thank you received: 403
11 years 5 months ago #106800

Hi there,

Indeed this option exists, you can find it in Display>Default parameters for Products and it's named "Display product code".

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

  • Posts: 101
  • Thank you received: 12
11 years 5 months ago #106818

I see!!
There it was hidding! :-)

Can I make a suggestion (feature request).
Since product names can be very long. I think it would be great to have two options in Cart Module.
Just under display price would be a good place to add these two parameters (see picture below to visualize what I'm talking about):

  • Display product name
  • Display product code

This will only affect the Cart module, regardless of the "Default parameters for products"
This way we have more flexibilty.

This picture is fake. It's just to illustrate the two options I was talking about :-)


Thanks.

Last edit: 11 years 5 months ago by SG.

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

  • Posts: 2334
  • Thank you received: 403
11 years 5 months ago #106844

Glad to see you found what you needed :)

Indeed these options could be a good idea, we'll think about the interest of this feature for the next version.

The following user(s) said Thank You: SG

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

Time to create page: 0.071 seconds
Powered by Kunena Forum