Weight display in the variant view

  • Posts: 102
  • Thank you received: 12
  • Hikashop Business
2 years 3 months ago #346358

Hello,

what has to be changed in product/form_variants.php so that the weight of the variants is also displayed?

Greetings from Christian

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

  • Posts: 83338
  • Thank you received: 13476
  • MODERATOR
2 years 3 months ago #346360

Hi,

The simplest would be to add the code:

(<?php echo $variant->product_weight; ?>)
after the code:
<?php echo $variant->product_code; ?>
in that view file to display the weight in parenthesis after the product code of each variant.

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

  • Posts: 102
  • Thank you received: 12
  • Hikashop Business
2 years 3 months ago #346445

Hi,

thanks for your answer, but it doesn`t help.

I changed

<td>
				<?php echo $variant->product_code; ?>(<?php echo $variant->product_weight; ?>)
			</td>

but no weight id displayed.

I also tried
			<td>
				<?php echo $variant->product_code; ?>
			</td>
      
      <td>
      <?php echo $variant->product_weight; ?> 
      </td>

with no result.

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

  • Posts: 83338
  • Thank you received: 13476
  • MODERATOR
2 years 3 months ago #346446

Hi,

Are you sure you're editing the correct view file for the correct backend template ?
Because I don't see why it wouldn't change anything, especially the second code you tried. It should break the variants table. So if you don't see any change, it means you're not changing the code at the correct place.

Last edit: 2 years 3 months ago by nicolas.

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

  • Posts: 102
  • Thank you received: 12
  • Hikashop Business
2 years 3 months ago #346461

Hello,

you are right, i changed it in the wrong template file. Fixed and working. Thanks!

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

Time to create page: 0.060 seconds
Powered by Kunena Forum