Post by straightlight » Mon Jan 16, 2012 2:32 am

From what I can add this time is that I can't reproduce this problem since my last instruction so I would also think the problem you may be encountering may also be due to VQMod conflict with other XML files which is also possible.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by filippota » Mon Jan 16, 2012 2:35 am

anyhow thank you very much for your help. i will have to deal with my server provider. will let you know if that was causing problems.

New member

Posts

Joined
Sun Jan 15, 2012 10:23 pm

Post by filippota » Mon Jan 16, 2012 6:07 pm

sry straightlight. this xml is not working on my site and i dont have clue of what my be wrong.

New member

Posts

Joined
Sun Jan 15, 2012 10:23 pm

Post by pbenfield » Sat Jan 21, 2012 8:26 pm

If this is of any use let me know as it is simple to add the code to the products as it is all there:

www.online-biz-uk.co.uk

let me know

New member

Posts

Joined
Wed Apr 20, 2011 3:43 pm

Post by filippota » Sat Jan 21, 2012 11:29 pm

yes pbenfield thats exactly the way i'd like to show dimensions on my site.

New member

Posts

Joined
Sun Jan 15, 2012 10:23 pm

Post by straightlight » Sun Jan 22, 2012 12:40 am

XML file fixed and posted with screenshots this time.

http://forum.opencart.com/viewtopic.php ... 10#p240126

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by filippota » Sun Jan 22, 2012 6:28 am

:) working. SOLVED THANKS to Straightlight!

a minor problem though. all lenght units are in kg on product page.

New member

Posts

Joined
Sun Jan 15, 2012 10:23 pm

Post by straightlight » Sun Jan 22, 2012 6:36 am

What are your settings under the admin - > products - > data page for that specific product ?

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by filippota » Sun Jan 22, 2012 6:41 am

lenght class - centimeter, weight class - kg

New member

Posts

Joined
Sun Jan 15, 2012 10:23 pm

Post by straightlight » Sun Jan 22, 2012 6:43 am

What I do find strange myself is that from the related products, I use the same object to track those settings as from the product details info as the related products seem to load the right unities. Is it loading correctly from your related products ?

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by filippota » Sun Jan 22, 2012 6:46 am

yes the units show correctly on related products tab.
same problem exists on your screenshot image.

New member

Posts

Joined
Sun Jan 15, 2012 10:23 pm

Post by straightlight » Sun Jan 22, 2012 6:49 am

I thought it was only related to my settings regarding the product details from my screenshot which is why I posted it anyway ... the same object is being used in both place ... perhaps I overlooked something I will have to look into this ... :|

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by straightlight » Sun Jan 22, 2012 7:02 am

Fixed and first screenshot changed.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by filippota » Sun Jan 22, 2012 7:09 am

now working as charm! great work straightlight. tons of thanks once again!

New member

Posts

Joined
Sun Jan 15, 2012 10:23 pm

Post by filippota » Sun Jan 22, 2012 3:50 pm

and yet :) dimensions for related products tab show even if no related products are assigned.

New member

Posts

Joined
Sun Jan 15, 2012 10:23 pm

Post by straightlight » Mon Jan 23, 2012 12:21 am

Simply use an if statement in the template block from the XML. This will allow this feature to only display if it's the case or not. ;)

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by filippota » Mon Jan 23, 2012 12:56 am

ok, i will take it as a php-newby first reallife exercise :) .

New member

Posts

Joined
Sun Jan 15, 2012 10:23 pm

Post by pbenfield » Mon Jan 23, 2012 5:36 am

filippota wrote:yes pbenfield thats exactly the way i'd like to show dimensions on my site.
YOU CAN DO THIS IN OPENCART 1.4.9.4 AS FOLLOWS

catalog/view/theme/default (your template)/product/product.tpl

You can view your php text from "line 19 "and compare with mine as all these "headings" are in the database automatically, those are the names in the brackets [,,,] but I have changed the text from the original title for example "location" in dataabse I have chaned the title to "information" but the entry you put into the product data entry field will be headed "Location". when viewing the product page the text wuill be changed to information with your text "information". You just need the sizes added as below (hope that is clear)

Code: Select all


  <?php if ($display_price) { ?>
            <tr>
              <td><b><?php echo $text_price; ?></b></td>
              <td><?php if (!$special) { ?>
                <?php echo $price; ?>&nbsp;excl. VAT
                <?php } else { ?>
                <span style="text-decoration: line-through;"><?php echo $price; ?></span>
                <?php } ?></td>
            </tr>
            <?php if ($special) { ?>
            <tr>
              <td><b>Offer excl. VAT:</b></td>
              <td><span style="color: #F00;"><?php echo $special; ?></span></td>
            </tr>
            <?php } ?>
            <?php } ?>
            <tr>
              <td><b><?php echo $text_availability; ?></b></td>
              <td><?php echo $stock; ?></td>
            </tr>
            <tr>
              <td><b><?php echo $text_model; ?></b></td>
              <td><?php echo $model; ?></td>
            </tr >
            <tr>
              <td><b>SKU:</b></td>
              <td><?php echo $product_info['sku']; ?></td>
            </tr>
             <tr>
              <td><b>Information:</b></td>
              <td><?php echo $product_info['location']; ?></td>
            </tr>
// add this code below begin.....................//
         <tr>
            <td><b>Length cm:</b></td>
              <td><?php echo $product_info['length']; ?></td>
            </tr>
            <tr>
              <td><b>width cm:</b></td>
              <td><?php echo $product_info['width']; ?></td>
            </tr>
            <tr>
              <td><b>Height cm:</b></td>
              <td><?php echo $product_info['height']; ?></td>
            </tr>
//code finished here .....//   
       
            <td><b>Min Quantity:</b></td>
              <td><?php echo $product_info['minimum']; ?></td>
            </tr>]            </tr>
            
            <?php if ($manufacturer) { ?>
            <tr>
              <td><b><?php echo $text_manufacturer; ?></b></td>
              <td><a href="<?php echo str_replace('&', '&', $manufacturers); ?>"><?php echo $manufacturer; ?></a></td>
            </tr>
            <?php } ?>
This is actual code I have used so I do not know which version you have but it must work on the 1.4.9 or others. You can see the headings in my website. Good luck and be careful addid code!

Hope it helps
Last edited by pbenfield on Mon Jan 23, 2012 6:58 am, edited 3 times in total.

New member

Posts

Joined
Wed Apr 20, 2011 3:43 pm

Post by straightlight » Mon Jan 23, 2012 5:41 am

The only problem is that the above does not use weight and length formatting and the linguistic text is hard-coded.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by pbenfield » Mon Jan 23, 2012 7:03 am

The database only is hard formatted but the text you put in will appear in the product. AS each country has their abbreviation for length, width etc etc which can be used to make it understandable in any language.

New member

Posts

Joined
Wed Apr 20, 2011 3:43 pm
Who is online

Users browsing this forum: No registered users and 18 guests