If this is your first visit, check our documentation. To post, register or login.
Forums / Templates, Stylesheets, Page Layout / changing the new category at homepage???

changing the new category at homepage???

Locked

Started by lastpirate007 on 31 Jul 2007, 12:42 PM · Views: 1,361

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
31 Jul 2007, 12:42 PM
#1
lastpirate007 avatar

lastpirate007

Zen Follower

Join Date:
Jul 2007
Posts:
137
Plugin Contributions:
0

changing the new category at homepage???

i want to give a new look to " new category " at home page .here is the reference image i like 2 set my category page.
if any 1 can help me regarding this then i will be highly grateful.

31 Jul 2007, 1:54 PM
#2
jettrue avatar

jettrue

Totally Zenned

Join Date:
Jan 2005
Location:
USA, St. Louis
Posts:
3,651
Plugin Contributions:
5

Re: changing the new category at homepage???

lastpirate007:

i want to give a new look to " new category " at home page .here is the reference image i like 2 set my category page.
if any 1 can help me regarding this then i will be highly grateful.

The hardest part of that will be getting the "details" button on there and the description.

But getting the image over to the left, you can use this in your stylesheet:

#whatsNew img{float:left;}
.centerBoxContentsNew {text-align:left;}

If you want the products in one column like that, you can go to "Configuration", and then "Index Listing" and change New Products Columns per Row to "1".

Then open includes/modules/YOUR_TEMPLATE/new_products.php

You'll want to change this line (~ line 57) from this:

'text' => (($new_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'products_id=' . $new_products->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $new_products->fields['products_image'], $new_products->fields['products_name'], IMAGE_PRODUCT_NEW_WIDTH, IMAGE_PRODUCT_NEW_HEIGHT) . '</a><br />') . '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'products_id=' . $new_products->fields['products_id']) . '">' . $new_products->fields['products_name'] . '</a><br />' . $products_price);

to this:

'text' => (($new_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'products_id=' . $new_products->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $new_products->fields['products_image'], $new_products->fields['products_name'], IMAGE_PRODUCT_NEW_WIDTH, IMAGE_PRODUCT_NEW_HEIGHT) . '</a>') . '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'products_id=' . $new_products->fields['products_id']) . '">' . $new_products->fields['products_name'] . '</a><div class="newListingPrice">' . $products_price . '</div>');

You'll also want to change this line (~ line 56):

$list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsNew centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"',

to this:

$list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsNew back"' . ' ' . 'style="width:' . $col_width . '%;"',

Then you'll need to remove .centerBoxContentsNew from this section in your css:

.centeredContent, TH, #cartEmptyText, #cartBoxGVButton, #cartBoxEmpty, #cartBoxVoucherBalance, #navCatTabsWrapper, #navEZPageNextPrev, #bannerOne, #bannerTwo,  #bannerThree,  #bannerFour,  #bannerFive,  #bannerSix, #siteinfoLegal, #siteinfoCredits, #siteinfoStatus, #siteinfoIP, .center, .cartRemoveItemDisplay, .cartQuantityUpdate, .cartQuantity, .cartTotalsDisplay, #cartBoxGVBalance, .leftBoxHeading, .centerBoxHeading,.rightBoxHeading, .productListing-data, .accountQuantityDisplay, .ratingRow, LABEL#textAreaReviews, #productMainImage, #reviewsInfoDefaultProductImage, #productReviewsDefaultProductImage, #reviewWriteMainImage, .centerBoxContents, .specialsListBoxContents, .categoryListBoxContents, .additionalImages, .centerBoxContentsSpecials, .centerBoxContentsAlsoPurch, .centerBoxContentsFeatured, .centerBoxContentsNew, .gvBal, .attribImg {
	text-align: center;
	}

So that the text isn't centered.

Then you can style the price with the new tag we added above, like this:
.newListingPrice {color:#ED91A2;font-weight:bold}

Now, how important to you is having the description, and the "details" button? :smartalec:

1 Aug 2007, 4:37 AM
#3
lastpirate007 avatar

lastpirate007

Zen Follower

Join Date:
Jul 2007
Posts:
137
Plugin Contributions:
0

Re: changing the new category at homepage???

thanks a lot for ur help. it is very important to place descripton and details. pls show me the path. i will not forget ur help.

1 Aug 2007, 5:54 AM
#4
lastpirate007 avatar

lastpirate007

Zen Follower

Join Date:
Jul 2007
Posts:
137
Plugin Contributions:
0

Re: changing the new category at homepage???

hi

i have changed as per ur post. her is the looks

i want some gap between 2 images.
i want gap between price ($300) and Category name ( Tsect )

i think this is simple thing for u. pls be kind with me

4 Aug 2007, 3:07 PM
#5
jettrue avatar

jettrue

Totally Zenned

Join Date:
Jan 2005
Location:
USA, St. Louis
Posts:
3,651
Plugin Contributions:
5

Re: changing the new category at homepage???

lastpirate007:

hi

i have changed as per ur post. her is the looks
i want some gap between 2 images.
i want gap between price ($300) and Category name ( Tsect )

i think this is simple thing for u. pls be kind with me

Sorry for the delayed reply, I was out of town...

To get the padding between the images, you can use this:

.centerBoxContentsNew img {padding:10px;}

You can also add padding above price, by changing this:

.newListingPrice {color:#ED91A2;font-weight:bold}

to this:

.newListingPrice {color:#ED91A2;font-weight:bold;padding-top:10px}

As for the description and the details button, I'll need to look into that more.

10 Aug 2007, 1:11 PM
#6
lastpirate007 avatar

lastpirate007

Zen Follower

Join Date:
Jul 2007
Posts:
137
Plugin Contributions:
0

Re: changing the new category at homepage???

thanks jade,

i ll never forget ur help. but i need description and details btn. so pls help meee

10 Aug 2007, 1:17 PM
#7
lastpirate007 avatar

lastpirate007

Zen Follower

Join Date:
Jul 2007
Posts:
137
Plugin Contributions:
0

Re: changing the new category at homepage???

hi jade

actually i am totally new to php. thats the problem. anyway i am giving u zen link
http://www.zen-cart.com/forum/showthread.php?t=69049

hope it will help u . i did nt understand it . i think it will solve my problem ..pls look it and give a simple descriptin to me

10 Aug 2007, 8:29 PM
#8
jettrue avatar

jettrue

Totally Zenned

Join Date:
Jan 2005
Location:
USA, St. Louis
Posts:
3,651
Plugin Contributions:
5

Re: changing the new category at homepage???

lastpirate007:

hi jade

actually i am totally new to php. thats the problem. anyway i am giving u zen link
http://www.zen-cart.com/forum/showthread.php?t=69049

hope it will help u . i did nt understand it . i think it will solve my problem ..pls look it and give a simple descriptin to me

Ok, you'll need to edit includes/modules/YOUR_TEMPLATE/new_products.php

First change this (starting at line 18):

if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) {
  $new_products_query = "select p.products_id, p.products_image, p.products_tax_class_id, p.products_price, p.products_date_added
                           from " . TABLE_PRODUCTS . " p
                           where p.products_status = 1 " . $display_limit;

with this:

if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) {
  $new_products_query = "select p.products_id, p.products_image, p.products_tax_class_id, p.products_price, p.products_date_added, pd.products_description
                           from (" . TABLE_PRODUCTS . " p
                           left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id )
                           where p.products_status = 1 " . $display_limit;

Then replace this (approx. line 58):

'text' => (($new_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'products_id=' . $new_products->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $new_products->fields['products_image'], $new_products->fields['products_name'], IMAGE_PRODUCT_NEW_WIDTH, IMAGE_PRODUCT_NEW_HEIGHT) . '</a>') . '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'products_id=' . $new_products->fields['products_id']) . '">' . $new_products->fields['products_name'] . '</a><div class="newListingPrice">' . $products_price . '</div>');

with this:

    'text' => (($new_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' : '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'products_id=' . $new_products->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $new_products->fields['products_image'], $new_products->fields['products_name'], IMAGE_PRODUCT_NEW_WIDTH, IMAGE_PRODUCT_NEW_HEIGHT) . '</a><br />') . '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'products_id=' . $new_products->fields['products_id']) . '">' . $new_products->fields['products_name'] . '</a><div class="newListingDescription">' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($new_products->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION)  . '</div><div class="newListingPrice">' . $products_price . '</div>' . '<a href="' . zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'products_id=' . $new_products->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_GOTO_PROD_DETAILS , BUTTON_GOTO_PROD_DETAILS_ALT) . '</a>'   );

The make sure that pink details button is saved and uploaded into your includes/templates/YOUR_TEMPLATE/buttons/english folder with this name:

button_goto_prod_details.gif

That will get you a lot closer. Then we can style it with the css to match.

18 Aug 2007, 10:29 AM
#9
lastpirate007 avatar

lastpirate007

Zen Follower

Join Date:
Jul 2007
Posts:
137
Plugin Contributions:
0

Re: changing the new category at homepage???

thanks jade

u r really gr8. god bless u always.....

take care