Forums / Templates, Stylesheets, Page Layout / How do I place " more info" on Product_listing/ products page? ( Image Included)

How do I place " more info" on Product_listing/ products page? ( Image Included)

Locked

Started by samar777 on 17 Mar 2010, 4:15 PM · Views: 1,439

Results 1 to 14 of 14
This thread is locked. New replies are disabled.
17 Mar 2010, 4:15 PM
#1
samar777 avatar

samar777

Zen Follower

Join Date:
Nov 2009
Location:
Chicago, IL.
Posts:
202
Plugin Contributions:
0

How do I place " more info" on Product_listing/ products page? ( Image Included)

After you click on a category, you arrive on the page that lists all the products in that category.

so, How do i place a similar link or image right under the partial description on that page.

Please look at the picture.

l

Automation is Godliness

18 Mar 2010, 7:31 AM
#2
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: How do I place " more info" on Product_listing/ products page? ( Image Included)

admin > configuration > Product Listing > Display Product Description

150= Suggested Length (Change to 50) a ... more info link will appear on the product listings

to change ... more

includes > languages > english.php

look for
define('MORE_INFO_TEXT','... more info');

change to
define('MORE_INFO_TEXT',' ---> More Info');

It worked on my site. Check it out, see if that is what you want. Not sure how to replace text with image

18 Mar 2010, 8:04 AM
#3
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: How do I place " more info" on Product_listing/ products page? ( Image Included)

To replace the text with image.

includes > languages > english.php

look for
define('MORE_INFO_TEXT','... more info');

change to
define('MORE_INFO_TEXT','/file_of_image/name_of_image.gif');

It worked on my site. Check it out, see if that is what you want. Not sure how to replace text with image

18 Mar 2010, 8:25 PM
#4
samar777 avatar

samar777

Zen Follower

Join Date:
Nov 2009
Location:
Chicago, IL.
Posts:
202
Plugin Contributions:
0

Re: How do I place " more info" on Product_listing/ products page? ( Image Included)

Thanks a lot. But that doesn't work on my site.

I need to know how to place an image in the code of "general_functions.php"
so that when the text is truncated, it shows image instead of "..."

but when i do place an image URL in this function, i get a blank page.

Any devs out there who can assist in placing an image in the highlighted of the image below.

Thanks in advance.

Automation is Godliness

19 Mar 2010, 7:54 PM
#5
new_tokkie avatar

new_tokkie

New Zenner

Join Date:
Mar 2010
Posts:
33
Plugin Contributions:
0

Re: How do I place " more info" on Product_listing/ products page? ( Image Included)

Hello,

I dont think you can do it like that.

What you need to do is create a new button.

/includes/languages/english/YOURTEMPLATE/button_names.php
similar to

define('BUTTON_CUSTOM_MORE', 'new_more_button.gif');

create the button, and put it in /includes/templates/YOURTEMPLATE/buttons/

then in your code that u wish to change something like this.

if ($more == 'true') $str .= "zen_image_button(BUTTON_CUSTOM_MORE, '') ";

Ive not tried it myself but I reckon it should work.....

19 Mar 2010, 10:18 PM
#6
new_tokkie avatar

new_tokkie

New Zenner

Join Date:
Mar 2010
Posts:
33
Plugin Contributions:
0

Re: How do I place " more info" on Product_listing/ products page? ( Image Included)

button directory

create the button, and put it in /includes/templates/YOURTEMPLATE/english/buttons/

19 Mar 2010, 10:27 PM
#7
new_tokkie avatar

new_tokkie

New Zenner

Join Date:
Mar 2010
Posts:
33
Plugin Contributions:
0

Re: How do I place " more info" on Product_listing/ products page? ( Image Included)

tried it and am :blush: ashamed to say my solution is a pile of kaak:yuck:

19 Mar 2010, 10:32 PM
#8
schoolboy avatar

schoolboy

Totally Zenned

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

Re: How do I place " more info" on Product_listing/ products page? ( Image Included)

Do you want THIS effect?

On the product LISTINGS page, the default behaviour is to EITHER have Buy Now or Add to Cart buttons . . . OR . . "More Info" link when the product has attributes.

The point here should be obvious... as you don't display attributes in Product LISTING, it's necessary to send the customer to the INFO page, where such selections are made.

But in the case of my example (LINK ABOVE), none of the products will ever have attributes, so I ADDED the behaviour of MORE INFO and BUY NOW into the grid.

If this is what you are after, I might be able to help via private message...

20 years a Zencart User

19 Mar 2010, 10:51 PM
#9
schoolboy avatar

schoolboy

Totally Zenned

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

Re: How do I place " more info" on Product_listing/ products page? ( Image Included)

OK... this may point you in the right direction:

After creating an appropriate image for the button, and defining the button, my edits are in:

includes/modules/MY-TEMPLATE/product_listing.php

(Naturally, the CORE file is in /modules/product_listing.php)

The following lines are from about line 179 - 180.

// qty box with add to cart button
            if (PRODUCT_LIST_PRICE_BUY_NOW == '2' && $listing->fields['products_qty_box_status'] != 0) {
              $lc_button= zen_draw_form('cart_quantity', zen_href_link(zen_get_info_page($listing->fields['products_id']), zen_get_all_get_params(array('action')) . 'action=add_product&products_id=' . $listing->fields['products_id']), 'post', 'enctype="multipart/form-data"') . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($listing->fields['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_draw_hidden_field('products_id', $listing->fields['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT) . '</form>';
            } else {
              $lc_button = '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT, 'class="listingBuyNowButton"') . '</a>';
            }
          }
        }
if (!zen_has_product_attributes($listing->fields['products_id'])) {
  $lc_text .= '<br />' . '<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 ? $_GET['cPath'] : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_MOREINFO, BUTTON_MOREINFO_ALT) . '</a>';
}
        $the_button = $lc_button;
        $products_link = '<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']) . '">' . zen_image_button(BUTTON_IMAGE_MOREINFO, BUTTON_MOREINFO_ALT) . '</a>';

COMPARE my code with the same section in the core file to see my alterations - chiefly

        $the_button = $lc_button;
        $products_link = '<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']) . '">' . zen_image_button(BUTTON_IMAGE_MOREINFO, BUTTON_MOREINFO_ALT) . '</a>';

20 years a Zencart User

23 Mar 2010, 4:03 AM
#10
samar777 avatar

samar777

Zen Follower

Join Date:
Nov 2009
Location:
Chicago, IL.
Posts:
202
Plugin Contributions:
0

Re: How do I place " more info" on Product_listing/ products page? ( Image Included)

hi, I think you are ALMOST seeing what I mean,

When you click on on category, you are taken you product listing page. on that page, I have products listed ( which you can click on and go to product info page).

I want to place an image like I mentioned above under EVERY product on product listing page. It will have the same URL as if you were to click on the image or product to get to product info page.

So, basically, I want to place an image that has same url as product, on product listing page.

I will wait for your reply because I think you know what i am tallking about.

Thank you very much.

Samar

Automation is Godliness

23 Mar 2010, 8:31 AM
#11
schoolboy avatar

schoolboy

Totally Zenned

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

Re: How do I place " more info" on Product_listing/ products page? ( Image Included)

Then you do as I suggest. My image hapens to say "more info", but you can create an image that says anything you like... "Happy Birthday Grandma" if you want.

20 years a Zencart User

7 Nov 2010, 7:45 AM
#12
kaniki avatar

kaniki

Zen Follower

Join Date:
Sep 2010
Posts:
111
Plugin Contributions:
0

Re: How do I place " more info" on Product_listing/ products page? ( Image Included)

I know this is an old thread- but I've found it while trying to "fix" something of my own.... What I would like shown- is just The Product Image- The Product Title- About 40 Words Of The Description- and a "....more infor" link... I don't want a button- just text...

I used part of your code- schoolboy- that you provided- and the more info link shows- only when I have my price and add to cart button turned on!!

Not so talented in the php coding area- and if you could help me customize to what you sort of have- but to what I need- I would be eternally grateful!!!

I just can't wrap my head around what variable in the code I need to change to make it happen....

P.s.. I would love to have the price also displayed under text- BUT- not an absolute must....

Hope this topic/thread isn't too old for someone to answer!!

Thanks Bunches!!

7 Nov 2010, 7:55 AM
#13
kaniki avatar

kaniki

Zen Follower

Join Date:
Sep 2010
Posts:
111
Plugin Contributions:
0

Re: How do I place " more info" on Product_listing/ products page? ( Image Included)

After typing that- I don't know what I did- but got it somewhat "tolerable"... While not exactly what I had pictured- it's starting to "take place"...

Here's a link to the page I"m experimenting on: http://kanikis.com/justforkeeps/index.php?main_page=index&cPath=43_46

And- now trying to figure out how to tighten up the space- in between what is there...

If anyone has any other suggestions to get exactly what I need- I would soooooo love that!!!

Enjoy the day!!

7 Nov 2010, 6:39 PM
#14
kaniki avatar

kaniki

Zen Follower

Join Date:
Sep 2010
Posts:
111
Plugin Contributions:
0

Re: How do I place " more info" on Product_listing/ products page? ( Image Included)

Got it!! A few tweaks here and there- thanks to another thread I was on!!!