Page 5 of 6

Re: Product Dimensions (L x W x H)

Posted: Mon Mar 12, 2012 2:15 am
by straightlight
Better results would be provided if both files were posted as an attachment instead. ;)

Re: Product Dimensions (L x W x H)

Posted: Mon Mar 12, 2012 5:50 am
by victorj
filippota wrote:straightlight. thanks for all that help! no success and i am guessing theres is something going on with the files permissions in vqcache folder. i cannot change files permissions in that folder to 777. all files in that vqache folder are chmod 644.
reset owner of files in your direct admin filemanager fileowner is now apache
now you can cmod them to 777.

consider going to a good hosting using cpanel it makes a difference and certainly makes your day better

Re: Product Dimensions (L x W x H)

Posted: Mon Mar 12, 2012 12:43 pm
by sayx
straightlight attached are the 3 files

\catalog\view\theme\default\template\product\product.tpl
\catalog\language\english\product\product.php
\catalog\controller\product\product.php

I would love to understand what is done, I have a few other things I'd like to add in the future and once I know this then maybe I could do it myself later. Last time I did any programing was on a commodore 64

sayx

Re: Product Dimensions (L x W x H)

Posted: Mon Mar 12, 2012 7:47 pm
by straightlight
Now that your files are attached, what is the problem with your previous code and what do you need ?

Re: Product Dimensions (L x W x H)

Posted: Mon Mar 12, 2012 8:39 pm
by sayx
I'm not getting the weight in the product page. I have a weight based shipping modual and I would like to show my customers the weight of each item.

What would be even better is is it would show the shipping cost of each item.

Weigth: 8kg
Shipping cost: 6.00€ (0.75€ x weight)

The thing is I have a minumen shipping charge so when a customer is under 80kg its 60€ and anything over 80kg is weight * 0.75. Like i said it would be nice but not a must have for me.

I have seen the addon moduals that would take care of this and may use that some day.

Sayx

Re: Product Dimensions (L x W x H)

Posted: Mon Mar 12, 2012 8:53 pm
by straightlight
sayx wrote:I'm not getting the weight in the product page. I have a weight based shipping modual and I would like to show my customers the weight of each item.

What would be even better is is it would show the shipping cost of each item.

Weigth: 8kg
Shipping cost: 6.00€ (0.75€ x weight)

The thing is I have a minumen shipping charge so when a customer is under 80kg its 60€ and anything over 80kg is weight * 0.75. Like i said it would be nice but not a must have for me.

I have seen the addon moduals that would take care of this and may use that some day.

Sayx
Done: http://forum.opencart.com/viewtopic.php ... 26#p240126

With your request, you can use the additional:

Code: Select all

<?php echo $product['shipping']; ?>
<?php echo $shipping; ?>
in the product.tpl file on each appropriate places by re-downloading the XML file.

Take note that the returned shipping value may differ from the one you're using with an API service. If you rely on an API service to gather the shipping price by the weight, do NOT use the shipping additions but rather remain with the API. The manufactured response is the most accurate one.

Re: Product Dimensions (L x W x H)

Posted: Tue Mar 20, 2012 11:15 pm
by labeshops
How can I only display the dimensions if they are > 0?? I really don't use dimensions for things like clothing and right now it displays as "Size (approx): 0.00 L x 0.00 H x 0.00 W/D Inches" for clothing.

Re: Product Dimensions (L x W x H)

Posted: Tue Mar 20, 2012 11:32 pm
by straightlight
Try this.

Re: Product Dimensions (L x W x H)

Posted: Wed Mar 21, 2012 2:29 am
by labeshops
Thanks! That solved it :)

Re: Product Dimensions (L x W x H)

Posted: Wed Mar 21, 2012 3:46 pm
by ikhlief
Dear stairghtlight, I used your new xml and works fine, but I need a little modification regarding format, take a look at this page:
http://www.jecjordan.com/index.php?rout ... uct_id=364

Can I make weight and dimension title in red and values in gray as other info instead in showing them all in gray?
From where I can translate units in Arabic?

Many thanks

Re: Product Dimensions (L x W x H)

Posted: Wed Mar 21, 2012 6:52 pm
by straightlight
Dear stairghtlight
No need to re-write the username, simply copy and paste it or quote it.
Can I make weight and dimension title in red and values in gray as other info instead in showing them all in gray?
Of course.

Solution 1:

In the XML file, look for language/english block and edit each lines between the <add> and </add> to specify the appropriate colors. :)

In Arabic case, it should also be language/arabic so simply add this entire block below the english block from <file ... to </file>.

Solution 2:

No matter which language from the XML file, you could edit the colors from templates which is a far easier solution since your request is about colors and not text specifically.

Re: Product Dimensions (L x W x H)

Posted: Wed Mar 21, 2012 7:08 pm
by ikhlief
Thanks for reply, but what is the code to be added?

Re: Product Dimensions (L x W x H)

Posted: Wed Mar 21, 2012 7:11 pm
by ikhlief
Thanks I solved it my self :)

Re: Product Dimensions (L x W x H)

Posted: Wed Mar 21, 2012 7:18 pm
by ikhlief
From where I can translate units in Arabic?

Re: Product Dimensions (L x W x H)

Posted: Wed Mar 21, 2012 10:41 pm
by straightlight
From the XML file where you see the English block, just create another block below the Arabic language. ;)

Re: Product Dimensions (L x W x H)

Posted: Sun Apr 01, 2012 10:45 pm
by labeshops
Is it possible to add this info to the specifications tab as well (or instead)?

I cannot seem to get it to work since the tab only displays if there are attributes, so no way I've found to make the tab always appear and with dimensions and weight even if there are no other attributes given :P

Re: Product Dimensions (L x W x H)

Posted: Sun Apr 01, 2012 10:53 pm
by straightlight
Perhaps you could describe how you achieved to only show this when they are attributes involved while I could make it work with or without it ? In both cases, it shouldn't really matter unless you're using a custom template that contains additional conditions where specific authors of specific contributions requires so.

Re: Product Dimensions (L x W x H)

Posted: Sun Apr 01, 2012 11:48 pm
by labeshops
I haven't done it in any way yet.

I use the default template.

Re: Product Dimensions (L x W x H)

Posted: Sun Apr 01, 2012 11:51 pm
by straightlight
My instructions should only affect the product info and the tabs. A good place would be to add the new tab block right beside the related products.

Re: Product Dimensions (L x W x H)

Posted: Mon Apr 02, 2012 12:46 am
by labeshops
I already renamed the specification tab to "Product Details" and eventually all my products will have details, but I have to go back thru and add them to the 2000k products I've already done. Example http://www.jewelrygemshop.com/pendant-c ... dant-TP922

I would just like to add at top of this box the same info your mod pulls like below as that info to me are some of the product details and I've already had people miss them under availability.

Size x L x W x D Inches
Shipping Weight: x lbs