Thanks for any information provided.
viewtopic.php?t=184213
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Code Line reads:
$data['description'] = html_entity_decode($product_info['description'], ENT_QUOTES, 'UTF-8');
Any suggestions? Thanks for your assistance so far.
https://www.opencart.com/index.php?rout ... n_id=36820
Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer
I'll look into both options. I'm happy to edit stuff, but just need help with the errors. Still getting the parse error explained before....
Thanks.
Using OC Version 3.0.3.2
Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer
$data['description'] = html_entity_decode($product_info['description'], ENT_QUOTES, 'UTF-8');
Can you see anything wrong with it? Thanks.
I also tried downloading the extension you mentioned, but after unzipping & trying to upload it in Extensions, OpenCart stated that the .xml file was an invalid file type. That was the only file in the folder? So not sure what to do there? But thanks for the suggestion.
But still getting the parse syntax error on the line of code in my previous post.
Thanks.
Using OC Version 3.0.3.2
What instructions?ihateusernames wrote: ↑Mon Jul 29, 2019 4:58 pmThanks, as I previously mentioned, I followed the instructions in the linked email.
Now need to unzip, just install as it is (blabla.ocmod.zip) and that tell you clear on extension page....
1. Go to Extensions-->Installer
2. Click on Upload and chose the file product_dimensions_and_weight.ocmod.zip
3. Refresh Ocmod
Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer
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 } ?>
Thanks.
And you have converted this code for 3.x?ihateusernames wrote: ↑Mon Jul 29, 2019 5:31 pm<?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 } ?>
Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer
(1) file location -> catalog / controller / product then open the product.php file
search/find line
$data['points'] = $product_info['points'];
Then after this line add the below line
$data['weight'] = $this->weight->format(($product_info['weight'] ) , $product_info['weight_class_id'], $this->language->get('decimal_point'), $this->language->get('thousand_point'))
(2) File Location-> catalog / view / theme / default or (Your_Theme_Folder_If_You_Use_any_theme) / template / product then product.twig file
search/find line <li>{{ text_stock }} {{ stock }}</li>
Then after this line add the below line
<li>{{'Weight:'}} {{weight}}</li>
Thanks.
Try with thisihateusernames wrote: ↑Mon Jul 29, 2019 5:58 pm$data['weight'] = $this->weight->format(($product_info['weight'] ) , $product_info['weight_class_id'], $this->language->get('decimal_point'), $this->language->get('thousand_point'))
$data['weight'] = $this->weight->format(($product_info['weight'] ) , $product_info['weight_class_id'], $this->language->get('decimal_point'), $this->language->get('thousand_point'));
And use
Code: Select all
<li>{{'Weight:'}} {{ weight }}</li>
Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer
However, still no weight or dimensions showing on the product page? If I use the attributes it looks like they show up in the specifications tab rather than on the product itself (as per Jonathan's suggestion). I'd rather they showed up on the product tab or info. Is this possible?
Thanks.
Using OC Version 3.0.3.2
Code work just fine
Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer
Apologies as I'm still finding my way around all the intricacies of this app. The layout & use is not what I was expecting, but hopefully I'll get there in the end
I've just noticed the weight is now shown twice, above & below the Dimensions.....!
Using OC Version 3.0.3.2
Then disable my extension....or remove that code and use my extension.ihateusernames wrote: ↑Mon Jul 29, 2019 6:54 pmI've just noticed the weight is now shown twice, above & below the Dimensions.....!
Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer
If I insert the lines of code, the weight & dimensions still don't show up at all?
If I remove the lines of code & enable your ext, then the weight is shown twice & the dimensions once?
Any suggestions? Thanks.
Using OC Version 3.0.3.2
Thanks.....
Using OC Version 3.0.3.2
Users browsing this forum: Bing [Bot], niagato and 649 guests