Post by Telefax » Fri Jun 13, 2008 1:26 am

The Opencart on this URL http://ourusedunderwear.com has an additional right column, and I wonder how it's done i.e. what files in template/default has been edited? I think layout.tpl somehow is involved but this is simply way to advanced for me to poke around in alone  :o

If anyone of you Opencart veterans can post plain HTML code on what/where to paste it in layout.tpl (if its where the code must be) and any extra files then please do, becouse http://ourusedunderwear.com has done a FANTASTIC job when he was placing the "cart" on its own in the right column.

Also I wonder where (what file) that needs to be edited to have 1024 resolution instead of Opencart's 800 as I clearly see that http://ourusedunderwear.com have changed that too :)

Sorry for the pesky questions...

New member

Posts

Joined
Sun Apr 06, 2008 4:47 pm

Post by mcphearson » Fri Jun 13, 2008 10:40 am

hey

first of all back up your files :)

If you want to add a new column on the right with a cart in go to template/default/layout.tpl

under this code:



   

   

   


   

   

   

 


add this code:


 
   

   

   





Then in your default style sheet you need to add the div id

so add this anywhere

#columns {

padding-left: 0px;
        width: 160px;
float: right;


}



If you do this you willl need to also edit the container id in your default style sheet too
the default is somthing like 800 you will have to change it to somthing like 1000


as an example heres my container id

#container {

width: 898px;
position: relative;
left: 45%;
margin-left: -419px;

}



Hope this helps, you may need some trial and error! Back up your files!!!!!

User avatar
Newbie

Posts

Joined
Mon Jun 09, 2008 2:05 am


Post by Telefax » Fri Jun 13, 2008 1:44 pm

To my great excitement this partially works, however it sadly seems that there is some extra "fluff" in my layout.tpl file (see image 001.jpg) and my attached layout.tpl file.

Please look at 002.jpg to see the error... aye, the column seems to be in proper place, but something is wrong with the main content (it's out of place). I get the feeling that this should be easy to iron out.

Naturally I include the two files: layout.tpl and default.css (due to upload restriction I rename layout.tpl to layout.txt and default.css to default.txt). My changes are marked, search for 777 in both files.

Please do take a look when you have time as I hardly can wait to have a 2nd column in my opencart  :P

The very best regards

New member

Posts

Joined
Sun Apr 06, 2008 4:47 pm

Post by Telefax » Fri Jun 13, 2008 2:46 pm

Hmm... you where right... I am altering lots in the css file, and indeed things start to happen  ;D

Please don't do anything for me yet in this matter as it seems everything starts to work out... I'll post my changes here when everything works 100%.

The core of the matter is: anyone wanting a 2nd column should follow your advice... only some changes need to be done (as you indeed told)...

...I'll keep you updated

New member

Posts

Joined
Sun Apr 06, 2008 4:47 pm

Post by Telefax » Fri Jun 13, 2008 3:06 pm

Okidoki... Now I have not seen how this work out in Opera, but here is the deal:

In Firefox everything works by the numbers 100% the way I want it...

In Internet Explorer from Micro$oft things (as they never do), a tiny whiny issue with some pixel-width on the right column (I can live with it)...

However, I noticed a SEVERE bug that has nothing to do with this: The sweet blue top graphics that show up in Firefox don't show up in Internet Explorer? This ruins the entire "look'n'feel" - is there anyway to get it to show up in IE? The graphic files is called: background.png (most strange indeed)

Anyways, here is the changes that "works" for me regarding the second column - I inserted a extra gray line that separate the column from the content just like in the orginal one...

Oh... sir, could you please also post how one include extra content in a column, like you have done with Google Adsense, technically one could insert advertises from Tradedoubler too this way... so whatr is needed is a topic like "Sponsors" and under it the "content" i.e. advertise  ::)

You are the best!!!

New member

Posts

Joined
Sun Apr 06, 2008 4:47 pm

Post by Luvz2drv » Fri Jun 13, 2008 3:21 pm

the png file with the css fix on it of the behaviour will not repeat X or Y    resave it a jpg and drop the behav part of the css tag and you will be set

Global Moderator

Posts

Joined
Fri Mar 21, 2008 10:58 am

Post by Telefax » Fri Jun 13, 2008 5:54 pm

Worked like a charm  ;D

If only the Javascript image popup idea from my other post would get the same easy-to-get solution... oh well, one can at least dream can one not?  :'(

Opencart is regardless of the Lightbox (grrr!!!) the best cart system there is  :D

Peace

New member

Posts

Joined
Sun Apr 06, 2008 4:47 pm

Post by JNeuhoff » Fri Jun 13, 2008 9:47 pm

I always found the default.css of OpenCart 0.7.7 a bit unusual, so I rewrote the CSS from scratch in my online store sites, basically using nested DIVs like this:

Code: Select all

<html>
  <body>
    <div id="container">
      <div id="header">....</div>
      <div id="navigation">....</div>
      <div id="column">....</div>
      <div id="content">....</div>
      <div id="footer">....</div>
    </div>
  </body>
</html>  
where the container-DIV is centered with a fixed pixel width, and where both the header, navigation, and footer DIVs are of 100% width each, while the column and content DIVs are left floated, adding up to 100% width. In this layout, a 3rd column could easily be added as

Code: Select all

<div id="rightcolumn">...</div>
after the content-DIV, again left-floated, as long as 'column', 'content', and the new 'rightcolumn' are no more than 100% in width relative to the container-DIV.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by mcphearson » Fri Jun 13, 2008 11:12 pm

Telefax it would be good to have a link to your site :)

If you have the cart at the top of the right column go to template/module/cart.tpl

and add somthing like this

Sponsers


Google adsense code here!!!





hope this helps

User avatar
Newbie

Posts

Joined
Mon Jun 09, 2008 2:05 am


Post by Telefax » Sat Jun 14, 2008 12:28 am

JNeuhoff, I am outmost interested if possible to have all your sweet files with your optimized code as it sounds like plain old HTML that even I partially can understand  ;D  ...I am sure others also could use it... hmm, why not put lots of explaining text in your files under <--- I do that in all my code to find out what I do and why I did it.

I look forward to seeing your good work!

New member

Posts

Joined
Sun Apr 06, 2008 4:47 pm

Post by Telefax » Sat Jun 14, 2008 12:56 am

mcphearson, I run the Opencart store on my local Apache server, but when every item is registered and sorted the store will go semi-live. Its a big collection of banknotes, bonds, title deeds, antiques, gemstones etc, etc...

For me eBay/paypal is "no-good" alternatives to the great Opencart system since I want to have direct control over all the steps. I get a bad "feeling" if my top quality items would be around eBay junk! No thanks! So it's (alt least for me) safe to say: Opencart is a blessing! The interface/administration looks SO GREAT directly out-of-the-box...

It took some time to get used to the registration of images on their own, and the product on its own... and at first i HATED it, but now I LOVE the system as its quite flexible and will be very valuable when I'll do "bonus deals" (combined items).

In my 1st session I think it'll be 350+ items in the store, but quite fast I'll have it up to near 1000. I would never put this much work in a software I did not trust! osCommerce might have the addons and all that "fluff", but I simply does not like the "orginal" product. The Opencart coder is a genius and have succeded to inject his vision here and it delivers directly... osCommerce needs hacks/addons etc, etc, etc and STILL fail to deliver what (sorry to repeat myself) Opencart does right from the box.

Sorry for writing as much as I do here, but it feels good to get all the "frustration off" from all my trails and errors with other cart-systems  >:(

So, all in all... Here is my "secret" Opencart to do list:

1. Get a good dreamlayout (that was done thanks to you mcphearson) - DONE

2. Get Javascript popup images to replace Lightbox - NOT DONE
In emergency I'll just remove "lightbox" and the images will show up in the same window, and when the customer has seen it, she/he just have to BACK one page... An alternative is to use a _TOP window to replace the Lightbox... Oh well... this is the "last" step I'll look into  :o

3. Replace all the cursed (and evil) address field with ONE box where the customer write the address AS she/he wants it... yeah, ALL homepages always FORCE users to use them boring UGLY boxes with Address 1 box, Address 2 box, Country < I hate them the most, its often a drop-down list to roll in... its a INSULT to customers!!!

It'll be a NIGHTMARE to "fix" (and remove) all not needed address boxes and the country box :( MySQL sure is a nightmare as I'll have to make a "new" item, if I cannot be smart and change Address 1 box into a FULL textbox? Hmm... and then "hide" the other boxes!? Bah! I'll have to make a forum search laters or make my own post on this before I mess around in it...

Soooooooooooo... I have a server ready for the Opencart and will give you the URL the moment it's semi-live

Thanks for all help so far...

New member

Posts

Joined
Sun Apr 06, 2008 4:47 pm

Post by Telefax » Sat Jun 14, 2008 1:06 am

Hmm  ??? I know its me, and the fault is mine, but somehow I must have messed up following your instructions, I edited the cart.tpl file and put the sponsor code at the bottom of the file... but it dont show up on my cart...  :P  ...strange... I might have missed something that you veterans do automatic but I dont  :D


[...]
     
   
 
 



Sponsers


Google adsense code here!!!




[...]


Do you see any errors I might have done, or missed...?

Sorry for beeing a pest with questions...  :)

New member

Posts

Joined
Sun Apr 06, 2008 4:47 pm

Post by mcphearson » Sat Jun 14, 2008 1:31 am

sorry its my fault

try

Sponsers



adsense code here






you dont need the center tags but i use them

User avatar
Newbie

Posts

Joined
Mon Jun 09, 2008 2:05 am


Post by Telefax » Sat Jun 14, 2008 2:13 am

Oh dear, its my fault again, I was directory: template/content/cart.tpl < WRONG

When I should have been in: template/module/cart.tpl < CORRECT

No wonders things go bad when one deviate from proper instructions  ;D

Beside some "pixels" to close to the cart-text (probably easy to solve) everything works again (thanks to you) 100%.

Actually, at the moment I enter lots items from a primitive flattable database I used to store lots products in... so its quite fun to do something in-between (PHP/MySQL is fantastic... everything happens live on all pages).

The "design" becomes better than BEST with you and your good ideas...  ;D

New member

Posts

Joined
Sun Apr 06, 2008 4:47 pm

Post by keyjo » Mon Jun 23, 2008 5:21 pm

Hello.

I´ve tried to make the 2nd column has you guys explained, but it did´n worked, it doesn´t appear anything, the page is exactly as it was...

Can anyone give a hand?  ???

New member

Posts

Joined
Tue Jun 03, 2008 12:18 am

Post by Telefax » Tue Jun 24, 2008 3:32 am

Yes of course... but... I am no veteran...

Tell us more in-detail what you have done and what happens (lots details). If you see nothing then (from my own experiences) you might have missed an } (deleted it) or forgotten an <  - yeah, its them small details that makes the entire mess!!!!!  :'(

Lets take it step for step...

Can you make a "clean" Opencart installation of the lastest version, then try again... if it don't work we will test by sending you my files :)

New member

Posts

Joined
Sun Apr 06, 2008 4:47 pm

Post by keyjo » Tue Jun 24, 2008 6:26 pm

I´ve done everithing you guys written, but it continues not working... :'(

Here are the files.

you can see what i´m saying in www.statiklab.com/loja

thank you for the help...

New member

Posts

Joined
Tue Jun 03, 2008 12:18 am

Post by Telefax » Wed Jun 25, 2008 1:43 am

Relax!  ;D

You have done it sir!!! It's just like when i also did it... everything is messed up in the CSS file... take a deep breath and say after me: everything IS working even if I cannot see it!!!!!!!  :D

Ok... I'll give you my personal settings in the CSS file, hold on....

Open default.css in catalog/template/default/css

Then you need to find and replace the:
#container and #columns with my code changes under here:

Code: Select all

#container {

   width: 983px;
   position: relative;
   left: 45%;
/* margin-left: -419px; */
   margin-left: -440px;
   
}

/* 777 - SECOND COLUMN - RUN */
#columns {
    padding-left: 0px;
        width: 167px;
   float: right;
/* 888 - EXTRA CHANGES */
margin: 10px 0px 15px 0px; 
   
}
/* 777 - SECOND COLUMN - END */

If it don't look good, then replace the:
#column and #content too...
#column {
width: 167px;
margin: 10px 15px 15px 0px;
float: left;
}

/* 777 */
#content {
margin: 10px 0px 15px 0px;
float: left;
padding-left: 15px;
border-left: 1px solid #EEEEEE;
/* width: 581px; */
width: 588px;

/* 888 - EXTRA CHANGES */
padding-right: 15px;
border-right: 1px solid #EEEEEE;
}

You see, I am no mastercoder, I just "try" things until it looks/works okay, so don't ask me what everything means in technical terms....

I got some cool extra "fluff" code if you want a cleaner "look" like I have on my store that soon will go live... but please implement the code given here and the homepage should look ok, so... BEST OF LUCK!!!!!

New member

Posts

Joined
Sun Apr 06, 2008 4:47 pm

Post by keyjo » Wed Jun 25, 2008 1:54 am

Thanks for your help, but wont this change the left column to right?

i'm not very expert in code, but i think that what's going to happen...
isn´t it?

Thanks.

New member

Posts

Joined
Tue Jun 03, 2008 12:18 am

Post by Telefax » Wed Jun 25, 2008 1:59 am

test the code, if it dont work, replace with backup...

This is how my store work right now (its not live, else I would have let you into it):

Attachments

???
example.jpg
???
example.jpg

New member

Posts

Joined
Sun Apr 06, 2008 4:47 pm
Who is online

Users browsing this forum: No registered users and 5 guests