Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Can I make attributes have a line break in between them?

Can I make attributes have a line break in between them?

Views: 1,444

Results 1 to 20 of 22
22 Jan 2013, 4:13 PM
#1
accracin avatar

accracin

New Zenner

Join Date:
Jan 2013
Posts:
13
Plugin Contributions:
0

Can I make attributes have a line break in between them?

Been working on this for hours, my attributes are all together with no break in between, i have tried editing the style sheet
with #productAttributes {
float: left;
width: 100% ;
}

i have tried to edit tpl product info and attributes with the <br class="clearBoth" /> and no matter were in the code i put it it just makes the attributes disappear. I must be putting it in the wrong place or not using the correct command any help is greatly appreciated.

site is https://www.funcogifts.com
a example is http://www.funcogifts.com/index.php?main_page=product_info&cPath=10_17_23&products_id=19
but if you look at any product the attributes are jumbled togather some look worst than others

22 Jan 2013, 4:20 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Can I make attributes have a line break in between them?

If you go to the Option Name Manager and click on EDIT you will see additional options for how the attributes should be laid out ...

22 Jan 2013, 5:06 PM
#3
accracin avatar

accracin

New Zenner

Join Date:
Jan 2013
Posts:
13
Plugin Contributions:
0

Re: Can I make attributes have a line break in between them?

thank you for the reply i have tried that also the options are
Image Styles:
0= Images Below Option Names
1= Element, Image and Option Value
2= Element, Image and Option Name Below
3= Option Name Below Element and Image
4= Element Below Image and Option Name
5= Element Above Image and Option Name

i have tried all of them and it still groups them togather
like choose your background then all the pictures there are fine
then I need a break then chose your font
break then type txt break
then photo upload 1
break photo upload 2
i may be not seeing a setting please let me know thank you so much

22 Jan 2013, 5:16 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Can I make attributes have a line break in between them?

Try setting:

Attribute Images per Row: 1
Attribute Style for Radio Buttons/Checkbox: 0

22 Jan 2013, 5:17 PM
#5
accracin avatar

accracin

New Zenner

Join Date:
Jan 2013
Posts:
13
Plugin Contributions:
0

Re: Can I make attributes have a line break in between them?

i have also tried changing the items per row

22 Jan 2013, 5:17 PM
#6
accracin avatar

accracin

New Zenner

Join Date:
Jan 2013
Posts:
13
Plugin Contributions:
0

Re: Can I make attributes have a line break in between them?

ill try that now thanks

22 Jan 2013, 5:21 PM
#7
accracin avatar

accracin

New Zenner

Join Date:
Jan 2013
Posts:
13
Plugin Contributions:
0

Re: Can I make attributes have a line break in between them?

i have photos for my attributes that really made it not look right is there a simple code in the css or tpl files that will just put a break to next row after each set of attributes

22 Jan 2013, 5:35 PM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Can I make attributes have a line break in between them?

Could you switch to the Classic Template for a minute?

Your layout, as is, doesn't appear correct from the git go ... :lookaroun

22 Jan 2013, 5:38 PM
#9
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Can I make attributes have a line break in between them?

Why are you running your store inside a frameset? This is a bad idea... Most payment gateways will abort transactions from sites run inside a frame. secondly, you will suffer on search rankings with all major search engines.

Get your store into the root directory and get rid of frames. They were deprecated over a decade ago.

22 Jan 2013, 6:10 PM
#10
accracin avatar

accracin

New Zenner

Join Date:
Jan 2013
Posts:
13
Plugin Contributions:
0

Re: Can I make attributes have a line break in between them?

sorry i had to make a delivery , i am changing it to classic now ,

Frameset no i have two stores on one server under funcosupply.com funcogifts.com is just a url forward to the second store

22 Jan 2013, 6:11 PM
#11
accracin avatar

accracin

New Zenner

Join Date:
Jan 2013
Posts:
13
Plugin Contributions:
0

Re: Can I make attributes have a line break in between them?

it is changed thanks

22 Jan 2013, 6:16 PM
#12
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Can I make attributes have a line break in between them?

Now try changing the settings on Option Name Color if you want the images different ... and see the effects on the images when you refresh the page ...

For the Option Names spacing, it does look like a css issue on the spacing between them ...

22 Jan 2013, 6:17 PM
#13
accracin avatar

accracin

New Zenner

Join Date:
Jan 2013
Posts:
13
Plugin Contributions:
0

Re: Can I make attributes have a line break in between them?

didnt need to change the settings now its just the way i wanted it .. i wonder what file in that template is causing that

22 Jan 2013, 6:25 PM
#14
accracin avatar

accracin

New Zenner

Join Date:
Jan 2013
Posts:
13
Plugin Contributions:
0

Re: Can I make attributes have a line break in between them?

i think i got it i loaded the template up and the changed the tpl product to .old and attributes to .old and its using the default one now . i sould be able to change the items per row ect now to make it look right thanks so much i lost the grey box that the attributes were in by doing this but i can live with that

22 Jan 2013, 6:30 PM
#15
accracin avatar

accracin

New Zenner

Join Date:
Jan 2013
Posts:
13
Plugin Contributions:
0

Re: Can I make attributes have a line break in between them?

Got it and the grey back in the box fixed Thank you so much it was the tpl attributes file the tpl product display was refering it to tpl attributes and the problem was the code in there thank you agian

22 Jan 2013, 6:32 PM
#16
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Can I make attributes have a line break in between them?

You might consider putting the radio buttons on top of the images rather than the bottom as when the images are different heights it is hard to tell which goes with which ...

22 Jan 2013, 6:48 PM
#17
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Can I make attributes have a line break in between them?

You also need a DISPLAY ONLY, DEFAULT option VALUE for each of the option NAMES...

Why?

I am able to ADD a product to the cart without making any selections. Customers do this all the time... They send in an order, and pay for it, and then don't get what they want.

By creating a DISPLAY ONLY option value, and making it the DEFAULT, a customer is FORCED (reminded) to make a valid selection before the product can be added to the cart.

If you go HERE, and try to add a product to the cart WITHOUT making a selection, you will see what happens...

22 Jan 2013, 6:51 PM
#18
accracin avatar

accracin

New Zenner

Join Date:
Jan 2013
Posts:
13
Plugin Contributions:
0

Re: Can I make attributes have a line break in between them?

got it thank you i did not relize that I will fix that now ..
do you know how to move the product description from the bottom of the page to above the attributes?

22 Jan 2013, 6:54 PM
#19
accracin avatar

accracin

New Zenner

Join Date:
Jan 2013
Posts:
13
Plugin Contributions:
0

Re: Can I make attributes have a line break in between them?

is there a quick way to add default to each attribute ? i know how to do it with each product didnt know if there was a store wide method to do it

22 Jan 2013, 7:12 PM
#20
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Can I make attributes have a line break in between them?

accracin:

got it thank you i did not relize that I will fix that now ..
do you know how to move the product description from the bottom of the page to above the attributes?

You need to edit a file called tpl_product_info_display.php

There MIGHT be a copy of this in: **/includes/templates/yorkshire_clean/templates/**tpl_product_info.display.php

If you do not have that file in your custom template folder (as shown above), you will need to grab a COPY of the core file from:
**/includes/templates/template_default/templates/**tpl_product_info.display.php

FTP the file to your home computer, and OPEN it for editing using a PLAIN TEXT EDITOR such as CRIMSON EDITOR (freeware on the www).

In that file, you will see the elements delimited by <!--- BOF xxxxx --> and <!-- EOF ---> comments.

You can CUT and PASTE these delimited "chunks" to re-order them.

I did this with that LINK I referenced earlier...

For example, they could be as follows:

<!--bof Prev/Next top position -->
<?php if (PRODUCT_INFO_PREVIOUS_NEXT == 1 or PRODUCT_INFO_PREVIOUS_NEXT == 3) { ?>
<?php
/**
 * display the product previous/next helper
 */
require($template->get_template_dir('/tpl_products_next_previous.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_products_next_previous.php'); ?>
<?php } ?>
<!--eof Prev/Next top position-->



<!--bof Main Product Image -->
<?php
  if (zen_not_null($products_image)) {
  ?>
<?php
/**
 * display the main product image
 */
   require($template->get_template_dir('/tpl_modules_main_product_image.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_main_product_image.php'); ?>
<?php
  }
?>
<!--eof Main Product Image-->



<!--bof Product Name-->
<h1 id="productName" class="productGeneral"><?php echo $products_name; ?></h1>
<!--eof Product Name-->



<!--bof Product Price block -->
<h2 id="productPrices" class="productGeneral">
<?php
// base price
  if ($show_onetime_charges_description == 'true') {
    $one_time = '<span >' . TEXT_ONETIME_CHARGE_SYMBOL . TEXT_ONETIME_CHARGE_DESCRIPTION . '</span><br />';
  } else {
    $one_time = '';
  }
  echo $one_time . ((zen_has_product_attributes_values((int)$_GET['products_id']) and $flag_show_product_info_starting_at == 1) ? TEXT_BASE_PRICE : '') . zen_get_products_display_price((int)$_GET['products_id']);
?></h2>
<!--eof Product Price block -->

You may want the display to follow this order, however:

<!--bof Prev/Next top position -->
<?php if (PRODUCT_INFO_PREVIOUS_NEXT == 1 or PRODUCT_INFO_PREVIOUS_NEXT == 3) { ?>
<?php
/**
 * display the product previous/next helper
 */
require($template->get_template_dir('/tpl_products_next_previous.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_products_next_previous.php'); ?>
<?php } ?>
<!--eof Prev/Next top position-->



<!--bof Main Product Image -->
<?php
  if (zen_not_null($products_image)) {
  ?>
<?php
/**
 * display the main product image
 */
   require($template->get_template_dir('/tpl_modules_main_product_image.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_main_product_image.php'); ?>
<?php
  }
?>
<!--eof Main Product Image-->



<!--bof Product Price block -->
<h2 id="productPrices" class="productGeneral">
<?php
// base price
  if ($show_onetime_charges_description == 'true') {
    $one_time = '<span >' . TEXT_ONETIME_CHARGE_SYMBOL . TEXT_ONETIME_CHARGE_DESCRIPTION . '</span><br />';
  } else {
    $one_time = '';
  }
  echo $one_time . ((zen_has_product_attributes_values((int)$_GET['products_id']) and $flag_show_product_info_starting_at == 1) ? TEXT_BASE_PRICE : '') . zen_get_products_display_price((int)$_GET['products_id']);
?></h2>
<!--eof Product Price block -->



<!--bof Product Name-->
<h1 id="productName" class="productGeneral"><?php echo $products_name; ?></h1>
<!--eof Product Name-->

MAKE A BACKUP OF THE ORIGINAL FILE IN YOUR CUSTOM TEMPLATE, then FTP the edited copy to the server.

You MIGHT also need to tweak the relevant CSS, and perhaps adjust some admin switches to get your desired design...