Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / HTML is product description OF product listing.. other questions!

HTML is product description OF product listing.. other questions!

Locked

Views: 2,148

Results 1 to 20 of 20
This thread is locked. New replies are disabled.
5 Mar 2009, 1:18 AM
#1
xfourninetwox avatar

xfourninetwox

New Zenner

Join Date:
Mar 2008
Posts:
57
Plugin Contributions:
0

HTML is product description OF product listing.. other questions!

So a while ago I pretty much gave up on the zen cart format because I found I couldn't make things look as I wanted. I'm trying again for the hell of it.

What I'd like is for my line breaks and font colors from my product description to show up in the Product Listing. I know generally people just list a short sentence with an ellipsis sign, but I don't really want to have product info pages as it is. I just the listing with the "buy now" button. (That's another story)
http://justaaudial.net/store/index.php?main_page=index&cPath=1

Here is the page I now use with the "buy now" buttons being linked to my zen cart. I pretty much want to match this page format wise http://justaaudial.net/releases.html

Also, I'd like to limit the Lisiting Description to a specific width, but everything I try in CSS does me no good. Any ideas?

Lastly, my product info page... I can't get seem to get the image to show up with a border... I tried #productMainImage.img{border:1px, color:#000000;}
.productMainImage{border:1px, color:#000000;}

etc, etc, but nothing works. I got it working on the product listing page a few months ago but still never figured it out

I'm running Zen Cart 1.3.8a I suppose.

If anyone can send me some ideas that'd be great, I'd love to fully intergrate zen-cart into my site.

5 Mar 2009, 2:20 AM
#2
gjh42 avatar

gjh42

Black Belt

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

Re: HTML is product description OF product listing.. other questions!

#productMainImage.img{border:1px, color:#000000;}

This would be an element which has an id tag of #productMainImage and a class tag of .img .

What you want is

#productMainImage img {border:1px; color:#000000;}

which is an image inside #productMainImage.
Also, you need a semicolon, not a comma, after 1px.

CSS is very particular about tiny details.

You can get HTML to work in the product listing with a simple edit to
/includes/modules/your_template/product_listing.php. Search the forum for "zen_clean_html" for threads with the details.

5 Mar 2009, 8:10 AM
#3
xfourninetwox avatar

xfourninetwox

New Zenner

Join Date:
Mar 2008
Posts:
57
Plugin Contributions:
0

Re: HTML is product description OF product listing.. other questions!

Tried both things and couldn't get either to work, the php edit just gave me blank pages

5 Mar 2009, 8:34 AM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: HTML is product description OF product listing.. other questions!

Stylesheet:

You need to pay close attention to your css edits....

Find this, which is a class - -But you have omitted the leading period

listingDescription {width:293px; }

And to get closer to what you seek change it to the following:

.listingDescription {
        width:293px; 
        margin: 1em 0em 0em 20em;
        }

For Your border find this tag and replace with the following:

#productMainImage img {
        border: 1px solid #000000;
        }
5 Mar 2009, 9:45 AM
#5
gjh42 avatar

gjh42

Black Belt

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

Re: HTML is product description OF product listing.. other questions!

border:1px, color:#000000;
border:1px; color:#000000;
border: 1px solid #000000;

Oops... sometimes a small error can distract attention from a bigger one :)

5 Mar 2009, 9:58 AM
#6
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: HTML is product description OF product listing.. other questions!

gjh42:

Oops... sometimes a small error can distract attention from a bigger one :)
That is why we are a community!! And you have assisted myself on other posts where I seemed to have blinders on!

5 Mar 2009, 10:31 AM
#7
schoolboy avatar

schoolboy

Totally Zenned

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

Re: HTML is product description OF product listing.. other questions!

xfourninetwox:

...the php edit just gave me blank pages

If you use a Plain Text Editor (Crimson Editor, Notepad++) then you should not end up with dud PHP.

8 Mar 2009, 9:11 AM
#8
xfourninetwox avatar

xfourninetwox

New Zenner

Join Date:
Mar 2008
Posts:
57
Plugin Contributions:
0

Re: HTML is product description OF product listing.. other questions!

kobra:

Stylesheet:

You need to pay close attention to your css edits....

Find this, which is a class - -But you have omitted the leading period

listingDescription {width:293px; }

> And to get closer to what you seek change it to the following:
> ```
.listingDescription {
        width:293px; 
        margin: 1em 0em 0em 20em;
        }

For Your border find this tag and replace with the following:

#productMainImage img {
border: 1px solid #000000;
}




Thank you this was a big help, now I just need a solution to the HTML in the product description. I'm not sure what using Notepad would do to prevent dud php?
8 Mar 2009, 12:55 PM
#9
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: HTML is product description OF product listing.. other questions!

Thank you this was a big help, now I just need a solution to the HTML in the product description. I'm not sure what using Notepad would do to prevent dud php?
I am not sure if the above is meant as a single response??
If it is please note that the product description function can only contain html coding - - NOT php code

8 Mar 2009, 4:32 PM
#10
gjh42 avatar

gjh42

Black Belt

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

Re: HTML is product description OF product listing.. other questions!

HTML in the product description

Answered in post #2 above.

9 Mar 2009, 5:51 AM
#11
xfourninetwox avatar

xfourninetwox

New Zenner

Join Date:
Mar 2008
Posts:
57
Plugin Contributions:
0

Re: HTML is product description OF product listing.. other questions!

kobra:

I am not sure if the above is meant as a single response??
If it is please note that the product description function can only contain html coding - - NOT php code

Sorry, I meant that I couldn't get the clean html working for some reason. I searched the forum for zen clean html and found a thread. I copied and pasted the recommendation into my product listing php page but saw no result? Nothing seemed to change, I tried it again while using something similar from another thread and got a blank page.

9 Mar 2009, 1:00 PM
#12
schoolboy avatar

schoolboy

Totally Zenned

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

Re: HTML is product description OF product listing.. other questions!

gjh42 explains this in a little more detail here:

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

10 Mar 2009, 10:30 PM
#13
xfourninetwox avatar

xfourninetwox

New Zenner

Join Date:
Mar 2008
Posts:
57
Plugin Contributions:
0

Re: HTML is product description OF product listing.. other questions!

schoolboy:

gjh42 explains this in a little more detail here:

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

Hey, I attempted to replace any zen_clean_html with the /zen_clean_html/ in my /includes/modules/product_listing.php file, still no results. What am I doing wrong?

10 Mar 2009, 11:48 PM
#14
gjh42 avatar

gjh42

Black Belt

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

Re: HTML is product description OF product listing.. other questions!

We can't tell without seeing exactly what you have done, and where.

11 Mar 2009, 6:34 AM
#15
xfourninetwox avatar

xfourninetwox

New Zenner

Join Date:
Mar 2008
Posts:
57
Plugin Contributions:
0

Re: HTML is product description OF product listing.. other questions!

          $lc_text = '<h3 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' . zen_trunc_string(/*zen_clean_html*/(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>' ;
        } else {
          $lc_text = '<h3 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id']) > 0 ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' . zen_trunc_string(/*zen_clean_html*/(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>';
        }
    //  $list_box_contents[$rows][] = array('params' => 'class="' . $list_box_description . '" colspan="' . $zc_col_count_description . '"',
    //  'text' => zen_trunc_string(/*zen_clean_html*/(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION));
    //}

replaced anything with "zen_clean_html" with "/zen_clean_html/" like mentioned in that thread

11 Mar 2009, 5:18 PM
#16
gjh42 avatar

gjh42

Black Belt

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

Re: HTML is product description OF product listing.. other questions!

If that's all you have done, and it is in the active copy of product_listing.php, it will work.
You say you edited /includes/modules/product_listing.php; is there a file at /includes/modules/your_template/product_listing.php? That is where you should save any edited copy of the file, not in the original location. If there is a copy there, it will override the original one.

Are you sure the edit got saved when you uploaded the file? Download the file, or look at it in place, and make sure that the edit is there. Permissions could prevent an edit from saving.

11 Mar 2009, 8:17 PM
#17
xfourninetwox avatar

xfourninetwox

New Zenner

Join Date:
Mar 2008
Posts:
57
Plugin Contributions:
0

Re: HTML is product description OF product listing.. other questions!

You know, that was it! I had completely forgotten I had made a folder for my own template a few months ago with my own product_listing.php in it. Thanks very much.

And one last question and I'll stop bothering you!

What file do I use to edit out some things on the product listing pages?

For example: I added the product model number to the top of each image. I find the code as

<div class="productListing-data">JAA002</div>

I tried making a css option to have it a bit bigger and bold but it didn't seem to work, or I don't know exactly how to go about it.

I'd like it to resemble the catalog/model number oh http://justaaudial.net/releases.html

Also, I was able to hide the itemTitle in css, but when I tried to float the "Buy Now" button it floated it all the way to left of the page so that it wasn't justified with the paragraph. Maybe it would be easier to delete the cost/buy now section from the php and just add it into my item description in html? (I suppose then it would double up when someone clicked on the product and saw the product description page! :wacko:)

16 Mar 2009, 1:51 PM
#18
xfourninetwox avatar

xfourninetwox

New Zenner

Join Date:
Mar 2008
Posts:
57
Plugin Contributions:
0

Re: HTML is product description OF product listing.. other questions!

any ideas for this last one, or is it just not possible?

16 Mar 2009, 2:13 PM
#19
gjh42 avatar

gjh42

Black Belt

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

Re: HTML is product description OF product listing.. other questions!

Should be possible, but will take more time than I have right now to work out. Be back later.

30 Mar 2009, 11:42 PM
#20
xfourninetwox avatar

xfourninetwox

New Zenner

Join Date:
Mar 2008
Posts:
57
Plugin Contributions:
0

Re: HTML is product description OF product listing.. other questions!

can anyone help on this. i think i may give up