Forums / Setting Up Categories, Products, Attributes / Why the big empty space between the first and second attribute?

Why the big empty space between the first and second attribute?

Results 1 to 15 of 15
04 Oct 2009, 18:41
#1
bebe avatar

bebe

New Zenner

Join Date:
Jul 2009
Posts:
35
Plugin Contributions:
0

Why the big empty space between the first and second attribute?

I have multiple attributes on some products. I always get about 4 lines between the first and the second attributes, then about 2 lines between the second and the third, the third and the fourth...

You can find my site at ( it is in french only ) : www.bebebroderie.com

I am using this version of zencart : Zen Cart 1.3.8a

I use these add-on:

SplitTaxLines
French language pack
Image Handler 2 for v1.3.x
04 Oct 2009, 19:21
#2
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: Why the big empty space between the first and second attribute?

It is because of the way the attributes and the add to cart box are postioned. Both use floats.

The attributes include a clear:both in the code which pushes the second attribute down below the add to cart box.


Add this to the bottom of your stylesheet as a quick fix:

#productAttributes .clearBoth {clear:left;}
04 Oct 2009, 19:50
#3
bebe avatar

bebe

New Zenner

Join Date:
Jul 2009
Posts:
35
Plugin Contributions:
0

Re: Why the big empty space between the first and second attribute?

It worked. Thanks for the quick reply.
05 Oct 2009, 17:22
#4
bebe avatar

bebe

New Zenner

Join Date:
Jul 2009
Posts:
35
Plugin Contributions:
0

Re: Why the big empty space between the first and second attribute?

I have another problem. In my product listing, the price come up at the top of the last column and add to cart at the bottom. But I don't see add to cart anymore and my price is a little too high if compare to the image and description.

Where can I fix this? There is a lot of product_listing files and I don't know which one?
06 Oct 2009, 17:20
#5
bebe avatar

bebe

New Zenner

Join Date:
Jul 2009
Posts:
35
Plugin Contributions:
0

Re: Why the big empty space between the first and second attribute?

Forget it. I just deleted the whole price column.
29 Apr 2010, 16:30
#6
joeguy44 avatar

joeguy44

New Zenner

Join Date:
Mar 2009
Posts:
15
Plugin Contributions:
0

Re: Why the big empty space between the first and second attribute?

anyone know how to edit the text,"Please Choose," instead of hiding it?

also, any ideas on how to move the checkboxs of my attributes to be infront of the attribute text instead of after?
29 Apr 2010, 17:21
#7
bigal49 avatar

bigal49

Zen Follower

Join Date:
Mar 2010
Posts:
236
Plugin Contributions:
0

Re: Why the big empty space between the first and second attribute?

A link to your site please.
29 Apr 2010, 20:37
#8
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: Why the big empty space between the first and second attribute?

Please Choose is in

includes/languages/english/product.php

or the equivalent file.

The best way of moving the checkboxes is by editing modules/attributes.php but I might be able to come up with a simpler css 'fix' if you post a link to the site.
30 Apr 2010, 18:31
#9
joeguy44 avatar

joeguy44

New Zenner

Join Date:
Mar 2009
Posts:
15
Plugin Contributions:
0

Re: Why the big empty space between the first and second attribute?

niccol:

Please Choose is in

includes/languages/english/product.php

or the equivalent file.

The best way of moving the checkboxes is by editing modules/attributes.php but I might be able to come up with a simpler css 'fix' if you post a link to the site.


thanks niccol! it was the product_info.php file. Sweet!:clap:

as for the checkboxes, here is a link to a product page example that I would like to fix...

http://www.kugelkomponents.com/zencart/index.php?main_page=product_info&cPath=4_5&products_id=8

I am struggling with how to handle the checkbox ID that is unique to each attribute (see snip below). It seems to me that I need something consistent - like a class - to control them via css?

Here is a code snip of the attribute section...

<div id="productAttributes">
<h3 id="attribsOptionsText">Options and Upgrades: </h3>
<div class="wrapperAttribsOptions">
<h5 class="optionName back">
Universal Mounting Brackets
<input id="attrib-3-5" type="checkbox" value="5" name="id[3][5]"/>
<label class="attribsCheckbox" for="attrib-3-5"> ( +$45.00 ) (+2lbs) </label>
<br/>
</h5>
</div>
<br class="clearBoth"/>
<div class="wrapperAttribsOptions">
<h5 class="optionName back">
Slotted Brake Pedal Arm Upgrade
<input id="attrib-2-4" type="checkbox" value="4" name="id[2][4]"/>
<label class="attribsCheckbox" for="attrib-2-4"> ( +$40.00 )</label>
<br/>
</h5>
</div>
<br class="clearBoth"/>
30 Apr 2010, 21:09
#10
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: Why the big empty space between the first and second attribute?

Have a look at this:

http://www.zen-cart.com/forum/showthread.php?t=130226

I went through the attributes with ad2r. There is also another thread that has my explanation a bit more clearly so you could search for that.

If you are still struggling post again :smile:
30 Apr 2010, 21:13
#11
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: Why the big empty space between the first and second attribute?

the cheeky css fix is to try:

#attrib-3-5{
float:left;
}


you'll need to do a rule for each attribute
03 May 2010, 15:52
#12
joeguy44 avatar

joeguy44

New Zenner

Join Date:
Mar 2009
Posts:
15
Plugin Contributions:
0

Re: Why the big empty space between the first and second attribute?

thanks Nick for the link to your posts. That bit of css for a2d's problem helped me get things going...

I have a worked out rough solution with css, but its not right IMO. I would still like to find a better control for how the attributes align and display. Once I add images to the attributes everything goes wacky.

I suspect that the code for //checkboxes in ...modules/attributes.php would need a new case for my idea. Which is way beyond my abilities.

or figure out a way to have each piece of the attribute code — input, label, img — that make up the tpl_modules_attributes.php statement <?php echo $options_menu[$i]; ?> specify classes or ids that can be targeted easier.

or I just don't know enough to do it differently.

or all of the above. :D

if you have ideas I would love to hear them.
03 May 2010, 18:33
#13
joeguy44 avatar

joeguy44

New Zenner

Join Date:
Mar 2009
Posts:
15
Plugin Contributions:
0

Re: Why the big empty space between the first and second attribute?

Nick, I hacked around a bit in attributes.php and got the "case 0" attribute setting to insert #id names for the input checkbox and changed the label class so I can write a single CSS rule instead of one for each specific attribute (attrib-?-?) as before...

case '0':
                      $tmp_checkbox .= zen_draw_checkbox_field('id[' . $products_options_names->fields['products_options_id'] . ']['.$products_options_value_id.']', $products_options_value_id, $selected_attribute, 'id="attributecheckbox"') . '<label class="attributelabel" for="' . 'attrib-' . $products_options_names->fields['products_options_id'] . '-' . $products_options_value_id . '">' . $products_options_details . '</label><br />' . "\n";
                      break;


now to test it out...:unsure:
04 May 2010, 16:29
#14
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: Why the big empty space between the first and second attribute?

sounds like you are making good progress. :smile:

let me know if I can help. And post your code so that others can see what you are doing. It always helps someone.
08 Jan 2011, 00:09
#15
fredmccay avatar

fredmccay

New Zenner

Join Date:
Dec 2010
Posts:
60
Plugin Contributions:
0

Re: Why the big empty space between the first and second attribute?

Thanks for the reply. This did not work though.

Thank you for the effort,
Fred McCaughey
www.idsupply.co