Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / CSS Buy Now Button not correctly displayed.

CSS Buy Now Button not correctly displayed.

Views: 2,197

Results 1 to 8 of 8
7 Aug 2011, 8:01 PM
#1
joey779 avatar

joey779

New Zenner

Join Date:
Mar 2011
Posts:
31
Plugin Contributions:
0

CSS Buy Now Button not correctly displayed.

I've attached a screenshot of my category product listing page.

It shows the product, price and a buy now button underneath.

Only problem is that the 'Buy Now' text is white and since there is no background colour on the button it cannot be seen.

(This isn't live hence the screenshot)

The New Products listing page displays the buttons as they should appear.

link(remove spaces):-

http: //www. arrowstorm. co. uk/index.php?main_page=products_new

Does anyone else have their buy now buttons showing correctly on their category product listing pages?

Is there a code snippet which must be present in tpl_modules_product_listings.php?

Help.....

7 Aug 2011, 9:56 PM
#2
ebaobao avatar

ebaobao

Zen Follower

Join Date:
Jul 2008
Posts:
495
Plugin Contributions:
0

Re: CSS Buy Now Button not correctly displayed.

isn't the buy now button an image? and so editing the image file would fix it.

7 Aug 2011, 10:10 PM
#3
joey779 avatar

joey779

New Zenner

Join Date:
Mar 2011
Posts:
31
Plugin Contributions:
0

Re: CSS Buy Now Button not correctly displayed.

No, I don't think it is an image.

It's CSS in the stylesheet_css_buttons.css file.

The button background seems to be drfinrd by:-

.btn_s_2_bg.cssButton
.btn_s2_bg.span.cssButton

and this is missing in the category page listing
(but present in the All products listing)

7 Aug 2011, 11:17 PM
#4
ebaobao avatar

ebaobao

Zen Follower

Join Date:
Jul 2008
Posts:
495
Plugin Contributions:
0

Re: CSS Buy Now Button not correctly displayed.

zen cart by default use image buttons. but i do see on your site that this is no longer the case as it looks like css. Did you switch out button images to css?

8 Aug 2011, 12:29 AM
#5
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: CSS Buy Now Button not correctly displayed.

joey779:

No, I don't think it is an image.

It's CSS in the stylesheet_css_buttons.css file.

The button background seems to be drfinrd by:-

.btn_s_2_bg.cssButton
.btn_s2_bg.span.cssButton

and this is missing in the category page listing
(but present in the All products listing)

what is the setting for:

admin -> configuration -> layout settings -> CSS Buttons

8 Aug 2011, 6:07 AM
#6
joey779 avatar

joey779

New Zenner

Join Date:
Mar 2011
Posts:
31
Plugin Contributions:
0

Re: CSS Buy Now Button not correctly displayed.

Yes, I am defintely using CSS buttons instead of images.

But there is some code missing from tpl_modules_product_listing.php as the button display is incomplete.

8 Aug 2011, 2:43 PM
#7
joey779 avatar

joey779

New Zenner

Join Date:
Mar 2011
Posts:
31
Plugin Contributions:
0

Re: CSS Buy Now Button not correctly displayed.

Does anyone have the code that displays the CSS buy now button please?

Or a working version that I can copy?

Possibly tpl_modules_product_listings?

(Ths CSS is ok becuase the buy now button is displayed on other listing pages eg. All Products.)

11 Aug 2011, 10:13 PM
#8
joey779 avatar

joey779

New Zenner

Join Date:
Mar 2011
Posts:
31
Plugin Contributions:
0

Re: CSS Buy Now Button not correctly displayed.

Still haven't solved this!

But I have noticed the following:

  1. The BUY NOW button is underlined on IE only and not Firefox.
  2. The BUY NOW button has no style sheet background.

Does anyone have these settings:-

Config>Product Listing> Display add to cart button is set to 1
Config>Product Listing>Display Multiple Products status and set button location is set to 0

Does your BUY NOW button display properly??