Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Positioning elements on the Product Info pages

Positioning elements on the Product Info pages

Views: 1,362

Results 1 to 7 of 7
6 Sep 2011, 3:36 PM
#1
haliciad2 avatar

haliciad2

New Zenner

Join Date:
Sep 2011
Location:
Topeka, KS
Posts:
4
Plugin Contributions:
0

Positioning elements on the Product Info pages

I am designing a website for a client, which is still under construction. I’ve created a custom template that matches the client’s requirements and am making modifications to the stylesheet.css. I’ve made extensive changes up to this point and the forums/Tutorials/Wiki have been of great help, but I’m having a problem now that doesn’t seem to be addressed anywhere.

I’m needing to position different elements that are part of the Product Info pages:

#productName
#productDetailsList
#productDescription
#productPrices
#productAttributes
#cartAdd

I am using Absolute positioning, and the way it appears on this product page is how I want it to show on all of them:
http://myladystoys.com/store/index.php?main_page=product_info&cPath=1&products_id=4
(still working on the Tell A Friend & Write A Review buttons though)

BUT....Not all product pages are displaying the same way. These elements on many of the other product pages appear as a jumbled mess, and I can’t figure out what is causing the elements to display correctly on some pages but not on all.
Examples of jumbled pages:
http://myladystoys.com/store/index.php?main_page=product_info&cPath=3&products_id=32
http://myladystoys.com/store/index.php?main_page=product_info&cPath=1&products_id=6

Any advice you can offer would be much appreciated! Thank you for taking the time to read.

Basic information:
Zen Cart v1.3.9h
New Install
Addons installed - Ceon URI Mapping & Column Layout Grid
Extensive customization, including a custom template
PHP 5.2
MySQL v5.0
http://myladystoys.com/store

6 Sep 2011, 3:45 PM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Positioning elements on the Product Info pages

I don't know why the pages are different, but I wouldn't use absolute positioning for that. You can move elements relative to each other by moving blocks around in tpl_product_info_display.php. It's pretty well commented so it's easy to see where everything is. Then fine tune placement in the stylesheet.

You can also search for product info in the Free Software Add Ons - someone may have already done the work for you.

6 Sep 2011, 7:01 PM
#3
haliciad2 avatar

haliciad2

New Zenner

Join Date:
Sep 2011
Location:
Topeka, KS
Posts:
4
Plugin Contributions:
0

Re: Positioning elements on the Product Info pages

Correction to my original posting:

I meant to say "Relative" positioning, NOT "Absolute" positioning. Sorry for the confusion.

Thanks for your replay @stevesh

I've already done some editing to the tpl_product_info_display.php. I've got everything in the display order that I want it. But for some reason if I leave it in the default positioning there is a whole lot of unnecessary white space and every element (except for product name) gets pushed down underneath the product main image. But I want it to display on the right side of the image.

I'll poke around in the addons and see if I can come up with anything there.

8 Sep 2011, 4:35 AM
#4
haliciad2 avatar

haliciad2

New Zenner

Join Date:
Sep 2011
Location:
Topeka, KS
Posts:
4
Plugin Contributions:
0

Re: Positioning elements on the Product Info pages

I tried 3 different Product Info Display addons but none of them were compatible with my other customizations. So back to square one - trying to figure out where the problem lies within my coding.

8 Sep 2011, 5:43 AM
#5
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,843
Plugin Contributions:
17

Re: Positioning elements on the Product Info pages

Your problem is your coding is very different between the product descriptions.
If you are using the html editor for product descriptions, click on the <> for each and see the difference in code.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

9 Sep 2011, 1:41 AM
#6
haliciad2 avatar

haliciad2

New Zenner

Join Date:
Sep 2011
Location:
Topeka, KS
Posts:
4
Plugin Contributions:
0

Re: Positioning elements on the Product Info pages

@dbltoe - Sure enough, that was exactly what the problem was! Thank you for taking the time to look at the coding, I really appreciate it.

I'm glad it ended up being something that simple. I was indeed using the text editor to copy & paste descriptions from the client's list. It must have picked up some of the formatting from that.

9 Sep 2011, 3:43 AM
#7
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,843
Plugin Contributions:
17

Re: Positioning elements on the Product Info pages

Glad you got it going and thanx for letting folks know the fix.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com