Post by techttz » Wed Dec 31, 2014 11:22 pm

Add this in "catalog/controller/product/product.php" add these lines
Find

Code: Select all

$data['text_reward'] = $this->language->get('text_reward');
put this code after

Code: Select all

$data['text_weight'] = $this->language->get('text_weight');
Find

Code: Select all

$data['reward'] = $product_info['reward'];
put this code after

Code: Select all

$data['weight'] = $product_info['weight'];
Add this in "catalog/view/theme/default/template/product/product.tpl"
Find

Code: Select all

<h2><?php echo $price; ?></h2>
put this code after

Code: Select all

Weight: <?php echo $weight; ?>

Newbie

Posts

Joined
Sat Nov 15, 2014 2:48 am

Post by IP_CAM » Thu Jan 01, 2015 10:36 am

Should not be hard, a Quick XML-Mod would be helpful for many, I guess...

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by gauravbora2008 » Tue Feb 17, 2015 6:52 pm

Works perfectly!

To make it look better, how can I show the weight unit with weight and strip out decimal zeroes
like 500g instead of 500.00000000 (as it is currently showing)

Thanks alot!


Posts

Joined
Tue Feb 17, 2015 6:44 pm

Post by gauravbora2008 » Wed Feb 18, 2015 10:03 pm

Works Perfectly !

To make it look better... can anybody help me with this?

Right now it is visible as 50.0000000

I want to show it as 50g

How can I do this?

Any help is much appreciated...
thanks


Posts

Joined
Tue Feb 17, 2015 6:44 pm

Post by IP_CAM » Thu Feb 19, 2015 12:08 am

check Google, there are several infos on this:
  • Remove decimals weight site.opencart.com
  • Remove decimals (Dimensions) site:forum.opencart.com
This OpenShop Extension could possibly do it for you:
http://openshop.org.ua/docs

Ernie
openshop.li/shop/

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by atrane » Tue May 12, 2015 2:27 am

NM, I figured it out. All of the changes need to be made in the system/modification/[address] that you have listed. Sorry for the post.

I figured out how to change the multiple 0's at the end of the weight by going into your OC database-> products table-> weight, under the length, it was set to (15,8), so I changed it to (15,2) success!

Thanks

Newbie

Posts

Joined
Thu Jun 09, 2011 9:51 pm

Post by IP_CAM » Tue May 12, 2015 9:02 am

atrane wrote:.. change the multiple 0's at the end of the weight by going into your OC database-> products table-> weight, under the length, it was set to (15,8), so I changed it to (15,2) success!
Good for you!
Good Luck
Ernie

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by Flysan » Tue May 12, 2015 7:22 pm

It work perfectly thanks but how to add the symbol of the weight after the number?

New member

Posts

Joined
Tue Apr 28, 2015 6:25 pm

Post by Pobb » Fri May 22, 2015 4:50 am

To include the weight suffix, edit your product.php and instead of:

Code: Select all

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


try putting:

Code: Select all

$data['weight'] = $this->weight->format($product_info['weight'], $product_info['weight_class_id']);

Active Member

Posts

Joined
Tue May 31, 2011 2:35 pm

Post by Flysan » Fri Jul 10, 2015 6:39 am

How to make it work in the category page?

New member

Posts

Joined
Tue Apr 28, 2015 6:25 pm

Post by viethemes » Fri Jul 10, 2015 8:46 pm

Flysan wrote:How to make it work in the category page?
I have create a VQMOD extension for that. If you are using VQMOD, you can install this extension https://www.dropbox.com/s/wlhy7mi8dbrln ... t.xml?dl=0.

http://www.viethemes.com - OpenCart turtorials, news, tips and stricks, extension

Our extensions:
Visual Theme Editor - Powerful tool for customizing style of any theme visually
Live Theme Editor - Customize layout, colors, backgrounds, fonts of the default theme
Theme Animation - Animation Editor for any theme

Extra Positions PRO, Custom JavaScript, Custom CSS and others


User avatar
Active Member

Posts

Joined
Thu Jan 08, 2015 12:17 pm

Who is online

Users browsing this forum: No registered users and 2 guests