Post by apollovs » Mon May 15, 2017 6:03 pm

Hi,
I am running a site on Opencart Version 2.3.0.2 and what i would like to do is display the measurements and weight of each product on the product page.

Is ths possible?

cheers

http://www.apollovsautograph.com/


New member

Posts

Joined
Sat Nov 01, 2014 5:17 am
Location - Buckinghamshire, England

Post by sachin6609 » Mon May 15, 2017 8:35 pm

HIi

Go to admin panel catalog->product

Add New Product or edit the exiting one

Go To data Tab and check the bottom of that tab

You can add the size and weight of that product

Thanks
Sachin

Active Member

Posts

Joined
Thu Jul 23, 2015 2:57 pm

Post by apollovs » Mon May 15, 2017 8:40 pm

Not sure you understand what i mean, i have already added the weights and sizes on the product page in my admin area but i would like these weights and measurements to also show on the product page and my web site so customers can view them before they buy

http://www.apollovsautograph.com/


New member

Posts

Joined
Sat Nov 01, 2014 5:17 am
Location - Buckinghamshire, England

Post by sachin6609 » Mon May 15, 2017 9:57 pm

Hii

Ok i got it

I will tell you the changes with file location and code 2marrow

Currently i just leave my laptop so i will sure tell you the solution dont warry . i know how to do this i have already done it in my localhost opencart

Thanks
Sachin

Active Member

Posts

Joined
Thu Jul 23, 2015 2:57 pm

Post by Gr3nT » Tue May 16, 2017 5:57 am

Weight and size are only displayed in one place for visitors.
Product comparison page and the weight may even be in the delivery way.
Or you can show it individually with development

Webáruház készítés | GrenT Média.hu


Newbie

Posts

Joined
Thu May 17, 2012 7:46 pm

Post by sachin6609 » Tue May 16, 2017 1:53 pm

Hii

it will be display on the product page just below the model,stock section

Thanks
Sachin

Attachments

weight on the product page.png

weight on the product page.png (206.89 KiB) Viewed 644 times


Active Member

Posts

Joined
Thu Jul 23, 2015 2:57 pm

Post by apollovs » Tue May 16, 2017 3:48 pm

sachin6609 wrote:
Tue May 16, 2017 1:53 pm
Hii

it will be display on the product page just below the model,stock section

Thanks
Sachin
Hi,
How do i do this as i see a screenshot but no instructions?

cheers

http://www.apollovsautograph.com/


New member

Posts

Joined
Sat Nov 01, 2014 5:17 am
Location - Buckinghamshire, England

Post by sachin6609 » Tue May 16, 2017 4:28 pm

Hii

Open the product controller file and search the below line

file location -> catalog / controller / product then open the product.php file

$data['points'] = $product_info['points'];

Then after this line add the below line

$data['weight'] = $product_info['weight'];
$data['length'] = $product_info['length'];
$data['width'] = $product_info['width'];
$data['height'] = $product_info['height'];

Then open the product.tpl file and serach for the below line

File Location-> catalog / view / theme / default or (Your_Theme_Folder_If_You_Use_any_theme) / template / product then product.tpl file

<li><?php echo $text_stock; ?> <?php echo $stock; ?></li>

just after that line add the below code

<?php if($weight) { ?>
Weight : <?php echo number_format($weight,2); ?>
<?php } ?>
<br/>
<?php if($length || $width || $height) { ?>
L x W x H : <?php echo number_format($length,2)," x ", number_format($width,2) , " x " , number_format($height,2); ?>
<?php } ?>

All The Best

Thanks
Sachin

Active Member

Posts

Joined
Thu Jul 23, 2015 2:57 pm

Post by apollovs » Wed May 17, 2017 1:16 am

I have done what you have put below but doesnt seem to work for me the details are not showing on the products pages?
sachin6609 wrote:
Tue May 16, 2017 4:28 pm
Hii

Open the product controller file and search the below line

file location -> catalog / controller / product then open the product.php file

$data['points'] = $product_info['points'];

Then after this line add the below line

$data['weight'] = $product_info['weight'];
$data['length'] = $product_info['length'];
$data['width'] = $product_info['width'];
$data['height'] = $product_info['height'];

Then open the product.tpl file and serach for the below line

File Location-> catalog / view / theme / default or (Your_Theme_Folder_If_You_Use_any_theme) / template / product then product.tpl file

<li><?php echo $text_stock; ?> <?php echo $stock; ?></li>

just after that line add the below code

<?php if($weight) { ?>
Weight : <?php echo number_format($weight,2); ?>
<?php } ?>
<br/>
<?php if($length || $width || $height) { ?>
L x W x H : <?php echo number_format($length,2)," x ", number_format($width,2) , " x " , number_format($height,2); ?>
<?php } ?>

All The Best

Thanks
Sachin

http://www.apollovsautograph.com/


New member

Posts

Joined
Sat Nov 01, 2014 5:17 am
Location - Buckinghamshire, England

Post by cyclops12 » Wed May 17, 2017 1:47 am

Have you gone into extensions/modifications and clicked the refresh button?

Active Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by apollovs » Wed May 17, 2017 2:52 am

cyclops12 wrote:
Wed May 17, 2017 1:47 am
Have you gone into extensions/modifications and clicked the refresh button?
Thanks works now!, you can tell i am new to this!

http://www.apollovsautograph.com/


New member

Posts

Joined
Sat Nov 01, 2014 5:17 am
Location - Buckinghamshire, England

Post by cyclops12 » Wed May 17, 2017 3:06 am

Hey no problems, happy to help :)

Active Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by Oyekunle » Wed Aug 23, 2017 5:30 am

hello please i use opencart 3
can you guide how to go about this
thanks

Newbie

Posts

Joined
Wed Aug 23, 2017 5:27 am
Who is online

Users browsing this forum: No registered users and 10 guests