Forums / General Questions / Aligning the Buttons under the product info in new listing page

Aligning the Buttons under the product info in new listing page

Started by newbie456 on 19 Aug 2011, 12:58 AM · Views: 957

Results 1 to 9 of 9
19 Aug 2011, 12:58 AM
#1
newbie456 avatar

newbie456

New Zenner

Join Date:
Aug 2011
Posts:
74
Plugin Contributions:
0

Aligning the Buttons under the product info in new listing page

Hi everyone.can anyone help me how can I place the buttons under the product info in new listing page. I know it may be too easy but im just new to zencart

Here is my current new listing page:
Attachment #9597

And here is what I want to be look like
Attachment #9598

Any help is much appreciated
Cheers

19 Aug 2011, 1:14 AM
#2
nigelt74 avatar

nigelt74

Totally Zenned

Join Date:
Sep 2005
Location:
Waikato, New Zealand
Posts:
1,558
Plugin Contributions:
1

Re: Aligning the Buttons under the product info in new listing page

newbie456:

Hi everyone.can anyone help me how can I place the buttons under the product info in new listing page. I know it may be too easy but im just new to zencart

Here is my current new listing page:
Attachment #9597

And here is what I want to be look like
Attachment #9598

Any help is much appreciated
Cheers

A link to your sit would help, as this is set by css, and that is dependant on your template

Webzings Design
Semi retired from Web Design

19 Aug 2011, 1:21 AM
#4
nigelt74 avatar

nigelt74

Totally Zenned

Join Date:
Sep 2005
Location:
Waikato, New Zealand
Posts:
1,558
Plugin Contributions:
1

Re: Aligning the Buttons under the product info in new listing page

If it is this site

cncspares.com<dot>au/index.php?main_page=products_new

Then it isn't css, the image and the button are in the same table cell which is next to the table cell that has the product info in it

So you will need to change the template file that controls the layout, somebodyelse should be able to tell you, I can't remember the name of it off the top of my head.

Or you could try asking where you purchased the template, as most sellers do give that advice

Webzings Design
Semi retired from Web Design

19 Aug 2011, 1:42 AM
#5
newbie456 avatar

newbie456

New Zenner

Join Date:
Aug 2011
Posts:
74
Plugin Contributions:
0

Re: Aligning the Buttons under the product info in new listing page

But I want the buttons to be under the product info table cell. Is it under the modules? Ive been trying to look for it under includes/modules/template/new_products.php Sorry but my knowledge in zencart is not that broad enough:no:

19 Aug 2011, 2:07 AM
#6
nigelt74 avatar

nigelt74

Totally Zenned

Join Date:
Sep 2005
Location:
Waikato, New Zealand
Posts:
1,558
Plugin Contributions:
1

Re: Aligning the Buttons under the product info in new listing page

Log into your admin and go here

admin --> configuration --> New Listing

It should allow you to set the position of the button, be aware though some template monster templates are hacked up frankenstein things that may not work correctly with the settings

Webzings Design
Semi retired from Web Design

19 Aug 2011, 2:24 AM
#7
newbie456 avatar

newbie456

New Zenner

Join Date:
Aug 2011
Posts:
74
Plugin Contributions:
0

Re: Aligning the Buttons under the product info in new listing page

yay! my buttons are now under the products info table cell :clap: thanks to you nigelt74, my next problem now is how will I make the 2 buttons adjacent to each other,

like this:
button1 button2

not like this:
button1
button2

19 Aug 2011, 2:45 AM
#8
nigelt74 avatar

nigelt74

Totally Zenned

Join Date:
Sep 2005
Location:
Waikato, New Zealand
Posts:
1,558
Plugin Contributions:
1

Re: Aligning the Buttons under the product info in new listing page

newbie456:

yay! my buttons are now under the products info table cell :clap: thanks to you nigelt74, my next problem now is how will I make the 2 buttons adjacent to each other,

like this:
button1 button2

not like this:
button1
button2

There is a break "<br />" in there thats causing that, its probably hardcoded in the
includes/templates/your_template/templates/tpl_modules_products_new_listing.php

I don't know i can't spot it in the default, but possibly its more obvious in yours

Webzings Design
Semi retired from Web Design

19 Aug 2011, 3:23 AM
#9
newbie456 avatar

newbie456

New Zenner

Join Date:
Aug 2011
Posts:
74
Plugin Contributions:
0

Re: Aligning the Buttons under the product info in new listing page

nigelt74:

There is a break "<br />" in there thats causing that, its probably hardcoded in the
includes/templates/your_template/templates/tpl_modules_products_new_listing.php

I don't know i can't spot it in the default, but possibly its more obvious in yours

I dont know if Im right but when I tried to remove the <br> in this code, it doesnt work out

more info in place of buy now
      if (PRODUCT_NEW_BUY_NOW != '0' and zen_get_products_allow_add_to_cart($products_new->fields['products_id']) == 'Y') {
        if (zen_has_product_attributes($products_new->fields['products_id'])) {
          $link = '<a href="' . zen_href_link(zen_get_info_page($products_new->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($products_new->fields['master_categories_id']) . '&products_id=' . $products_new->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
        } else {
//          $link= '<a href="' . zen_href_link(FILENAME_PRODUCTS_NEW, zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $products_new->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT) . '</a>';
          if (PRODUCT_NEW_LISTING_MULTIPLE_ADD_TO_CART > 0 && $products_new->fields['products_qty_box_status'] != 0) {
//            $how_many++;
            $link = TEXT_PRODUCT_NEW_LISTING_MULTIPLE_ADD_TO_CART . "<input type=\"text\" name=\"products_id[" . $products_new->fields['products_id'] . "]\" value=\"0\" size=\"4\" />";
          } else {
            $link = '<a href="' . zen_href_link(FILENAME_PRODUCTS_NEW, zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $products_new->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT) . '</a> ';
          }
        }

        $the_button = $link;
        $products_link = '<a href="' . zen_href_link(zen_get_info_page($products_new->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($products_new->fields['master_categories_id']) . '&products_id=' . $products_new->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
        $display_products_button = zen_get_buy_now_button($products_new->fields['products_id'], $the_button, $products_link) . '<br />' . zen_get_products_quantity_min_units_display($products_new->fields['products_id']) . str_repeat('<br clear="all" />', substr(PRODUCT_NEW_BUY_NOW, 3, 1));
      } else {
        $link = '<a href="' . zen_href_link(zen_get_info_page($products_new->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($products_new->fields['master_categories_id']) . '&products_id=' . $products_new->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
        $the_button = $link;
        $products_link = '<a href="' . zen_href_link(zen_get_info_page($products_new->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($products_new->fields['master_categories_id']) . '&products_id=' . $products_new->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>';
        $display_products_button = zen_get_buy_now_button($products_new->fields['products_id'], $the_button, $products_link) . '<br />' . zen_get_products_quantity_min_units_display($products_new->fields['products_id']) . str_repeat('<br clear="all" />', substr(PRODUCT_NEW_BUY_NOW, 3, 1));
      }

      if (PRODUCT_NEW_LIST_DESCRIPTION > '0') {
        $disp_text = zen_get_products_description($products_new->fields['products_id']);
        $disp_text = zen_clean_html($disp_text);

        $display_products_description = stripslashes(zen_trunc_string($disp_text, PRODUCT_NEW_LIST_DESCRIPTION, '<a href="' . zen_href_link(zen_get_info_page($products_new->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($products_new->fields['master_categories_id']) . '&products_id=' . $products_new->fields['products_id']) . '"> ' . MORE_INFO_TEXT . '</a>'));
      } else {
        $display_products_description = '';
      }