Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Where are buttons located?


wyrmpit

Recommended Posts

So, I wanted to install some new buttons, and was told to look in the /catalog/includes/languages/images/buttons folder and just overwrite the old ones. Well, that folder didn't exist. I had to go one deeper to /catalog/includes/languages/english/images/buttons. Ok, no big deal.

 

But after looking at the files in there, I realized those weren't the buttons my site was using! In fact after I thought about it, I don't think my site is using graphical buttons at all, but rather PHP virtual buttons ( I didn't just make that up did I? I know Java has them ).

 

Here's a link so you can have a look. What do I need to do to get my buttons working?

 

http://www.wyrmpit.com/

Link to comment
Share on other sites

So, I wanted to install some new buttons, and was told to look in the /catalog/includes/languages/images/buttons folder and just overwrite the old ones. Well, that folder didn't exist. I had to go one deeper to /catalog/includes/languages/english/images/buttons. Ok, no big deal.

 

But after looking at the files in there, I realized those weren't the buttons my site was using! In fact after I thought about it, I don't think my site is using graphical buttons at all, but rather PHP virtual buttons ( I didn't just make that up did I? I know Java has them ).

 

Here's a link so you can have a look. What do I need to do to get my buttons working?

 

http://www.wyrmpit.com/

 

 

You site has no buttons instead of

<a href="http://yoursite.com/store/catalog/index.php"><img src="includes/languages/english/images/buttons/button_continue.gif" border="0" alt="Continue" title=" Continue " width="100" height="22"></a>

 

You have

 

<a href="http://wyrmpit.com/index.php"><div class="cssButton"> Continue </div></a>

 

Means that these are in the CSS style sheet...

 

You have to update your php files to call the buttons

Link to comment
Share on other sites

You site has no buttons instead of

<a href="http://yoursite.com/store/catalog/index.php"><img src="includes/languages/english/images/buttons/button_continue.gif" border="0" alt="Continue" title=" Continue " width="100" height="22"></a>

 

You have

 

<a href="http://wyrmpit.com/index.php"><div class="cssButton"> Continue </div></a>

 

Means that these are in the CSS style sheet...

 

You have to update your php files to call the buttons

 

Which PHP files do I need to edit? I'm guessing it's a good number of them, right? Does anyone have some snippet code I could search and replace to get graphical buttons working instead of CSS buttons? I'm not the most adept PHP user.

Link to comment
Share on other sites

Which PHP files do I need to edit? I'm guessing it's a good number of them, right? Does anyone have some snippet code I could search and replace to get graphical buttons working instead of CSS buttons? I'm not the most adept PHP user.

 

/bump

Link to comment
Share on other sites

<?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?>

<?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?>

 

Above are two examples. Unfortunately you cant just 'search and replace' because each different button is unique, some simply link to pages while others submit forms.

 

However, I think the buttons are done by replacing the button functions in /includes/functions/html_output.php ..... so look there :)

 

Sonia

Link to comment
Share on other sites

Well, I'm looking at my /includes/modules/product_listing.php file and it looks like there IS a call to the button graphics, not for CSS buttons. But when you visit my product listing page, there's definetly CSS buttons there. Am I looking in the wrong place?

 

Excerpt from product_listing.php:

 

$lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';

 

Product page: http://wyrmpit.com/index.php?cPath=35_37

Link to comment
Share on other sites

Read my previous reply again.....

 

 

Look at the button functions in /includes/functions/html_output.php You will find this (standard osC)

 

// The HTML form submit button wrapper function
// Outputs a button in the selected language
 function tep_image_submit($image, $alt = '', $parameters = '') {
global $language;

$image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image) . '" border="0" alt="' . tep_output_string($alt) . '"';

if (tep_not_null($alt)) $image_submit .= ' title=" ' . tep_output_string($alt) . ' "';

if (tep_not_null($parameters)) $image_submit .= ' ' . $parameters;

$image_submit .= '>';

return $image_submit;
 }

////
// Output a function button in the selected language
 function tep_image_button($image, $alt = '', $parameters = '') {
global $language;

return tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image, $alt, '', '', $parameters);
 }

 

 

 

You probably have modified functions - replace them with the above :)

 

 

Sonia

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...