Forums / Templates, Stylesheets, Page Layout / Simulate layout of 'New Products' page

Simulate layout of 'New Products' page

Locked

Started by robinstl on 18 Nov 2007, 4:02 AM · Views: 1,330

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
18 Nov 2007, 4:02 AM
#1
robinstl avatar

robinstl

Zen Follower

Join Date:
Aug 2007
Location:
St. Louis
Posts:
111
Plugin Contributions:
0

Simulate layout of 'New Products' page

Hello,

I've been trolling for the answer on these boards for a while and no luck so here goes...

I've made a new category and chose 'Document - General' because I'm attempting to make a simple photo gallery in addition to a shopping cart. I'm getting there but I don't like the layout of the page.

I'd like for it to display exactly like it does when you click the 'New Products' link on the left side content box. Very simple, clean, nice spacing and the horizontal lines seperating the items. Could anyone give me a nudge in the right direction?

Heres a link to the test site I'm experimenting on...
http://karenwilliamson.com/catalog/

Click on 'My Collection' to see the layout I don't want and 'New Products' for what I want 'My Collection' to look like.

Thanks

18 Nov 2007, 4:15 AM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Simulate layout of 'New Products' page

Product Listing is Product Listing is Product Listing ... at this time ...

Currently there isn't a distinction between how Document General and Product General and any other Product type displays ...

In a future release we will be working towards more flexibility for the listings ...

You can, however, make your own listing, but that can get very tricky on trying to intercept when and where your categories are coming from and when to use which listing ...

It is not impossible, just difficult for the average bear ... have you got your coder hat on today? :smartalec:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

18 Nov 2007, 4:22 AM
#3
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Simulate layout of 'New Products' page

Start with the Column Grid mod in Downloads. This will put your individual product elements in a vertical line instead of horizontal. It will also give a grid display, which you can set in admin to as many products per row as you want.

It is possible to add some tags in the code in product_listing.php which you can then use to affect the layout with the stylesheet.

18 Nov 2007, 4:30 AM
#4
robinstl avatar

robinstl

Zen Follower

Join Date:
Aug 2007
Location:
St. Louis
Posts:
111
Plugin Contributions:
0

Re: Simulate layout of 'New Products' page

Ajeh:

It is not impossible, just difficult for the average bear ... have you got your coder hat on today? :smartalec:

Hi there, thanks for responding.

My coder hat would be on if I was getting more money for this. I guess I'll live with it but while were on this, could you tell me how I would keep the items in 'My Collection' or the document general category from showing up in 'New Products'?

Thanks

gjh42:

Start with the Column Grid mod in Downloads. This will put your individual product elements in a vertical line instead of horizontal. It will also give a grid display, which you can set in admin to as many products per row as you want.

It is possible to add some tags in the code in product_listing.php which you can then use to affect the layout with the stylesheet.

Okay... I'll give that a try. I'll post back a little later with results. Thanks.

18 Nov 2007, 5:02 AM
#5
ajeh avatar

ajeh

Oba-san

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

Re: Simulate layout of 'New Products' page

Make them OLD and not NEW ... :smile:

Change the field in the database for the products_date_added to an older date than your definition of New Products that you have Naturally set in the Maximum Values ...

New Product Listing - Limited to ...
Limit the New Product Listing to
0= All Products
1= Current Month
7= 7 Days
14= 14 Days
30= 30 Days
60= 60 Days
90= 90 Days
120= 120 Days

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

18 Nov 2007, 5:29 AM
#6
robinstl avatar

robinstl

Zen Follower

Join Date:
Aug 2007
Location:
St. Louis
Posts:
111
Plugin Contributions:
0

Re: Simulate layout of 'New Products' page

Ajeh:

Make them OLD and not NEW ... :smile:

Change the field in the database for the products_date_added to an older date than your definition of New Products that you have Naturally set in the Maximum Values ...

Wow... I'm batting .1000 tonight. Thank you :)

To gjh42... I installed the mod and it's much better! You mentioned being able to now fudge with the stylesheets to further alter the layout to a certain extent as well? I'd like to have the images align by the bottom instead of the top. To use old HTML code it would simply be <td align=center valign=bottom>

Thanks

18 Nov 2007, 5:45 AM
#7
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Simulate layout of 'New Products' page

There is not much (beside product name) that can be individually controlled by the stylesheet in the stock version of product_listing.php (even the col/grid version). Here's where you get your coder hat busy.

You can wrap divs with classes around elements that don't yet have them. For example, find this:```php
switch ($column_list[$col]) {
case 'PRODUCT_LIST_MODEL':
$lc_align = '';
$lc_text = $listing->fields['products_model'];
break;

'<div class="productListModel">' .
and
. '</div>'
to get this```php
      switch ($column_list[$col]) {
        case 'PRODUCT_LIST_MODEL':
          $lc_align = '';
          $lc_text = '<div class="productListModel">' . $listing->fields['products_model'] . '</div>';
          break;
```You can style .productListModel {} in your stylesheet.


The name has a label:```php
'<h3 class="itemTitle">
18 Nov 2007, 5:56 AM
#8
robinstl avatar

robinstl

Zen Follower

Join Date:
Aug 2007
Location:
St. Louis
Posts:
111
Plugin Contributions:
0

Re: Simulate layout of 'New Products' page

gjh42:

There is not much (beside product name) that can be individually controlled by the stylesheet in the stock version of product_listing.php (even the col/grid version). Here's where you get your coder hat busy.

You can wrap divs with classes around elements that don't yet have them. For example, find this:```php
switch ($column_list[$col]) {
case 'PRODUCT_LIST_MODEL':
$lc_align = '';
$lc_text = $listing->fields['products_model'];
break;

> '<div class="productListModel">' .
> and
> . '</div>'
> to get this```php
      switch ($column_list[$col]) {
        case 'PRODUCT_LIST_MODEL':
          $lc_align = '';
          $lc_text = '<div class="productListModel">' . $listing->fields['products_model'] . '</div>';
          break;
```You can style .productListModel {} in your stylesheet.
> 
> 
> The name has a label:```php
'<h3 class="itemTitle">

This is good!

It's funny, I have no problem installing, doing all the security steps, setting up his shipping/payment modules, payment gateway, ssl, etc but it's always these little details that get me.

Thanks again :)

18 Nov 2007, 6:16 AM
#9
robinstl avatar

robinstl

Zen Follower

Join Date:
Aug 2007
Location:
St. Louis
Posts:
111
Plugin Contributions:
0

Re: Simulate layout of 'New Products' page

robinstl:

This is good!

It's funny, I have no problem installing, doing all the security steps, setting up his shipping/payment modules, payment gateway, ssl, etc but it's always these little details that get me.

Thanks again :)

I spoke too soon. I can add the the divs to 'product_listing.php' fine but I don't have a clue on what to do with the .css file to align the text along the bottom. :unsure: