Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / buttons for template override not working for me

buttons for template override not working for me

Views: 1,260

Results 1 to 20 of 20
25 May 2011, 8:26 PM
#1
babagee avatar

babagee

New Zenner

Join Date:
Dec 2005
Location:
The Land of Enchantment
Posts:
49
Plugin Contributions:
0

buttons for template override not working for me

So I've begun the process of making custom buttons.

Have loaded them up into what I believe to be the correct Template override folder for buttons:

Includes / Templates / Custom / Buttons / English

Is this the correct location?

.. and none of them are showing up to replace the default Zen v 1.3.9h gif image buttons on my site.

I've made sure that the CSS buttons options is set to "NO" in Admin / config / Layout settings.

I've checked the names for the buttons in Languages / english / button_names. php ... I haven't changed anything anyways.

Refreshed the browser an' all that carry on! None of m'new buttons are showing up! :(

Thoroughly Stumped! Help!

25 May 2011, 8:33 PM
#2
donal avatar

donal

Zen Follower

Join Date:
Jan 2009
Location:
Ireland
Posts:
442
Plugin Contributions:
0

Re: buttons for template override not working for me

have you replaced "custom" with the name of your template?
Templates / The name of your template goes here / Buttons / English:huh:

25 May 2011, 11:49 PM
#3
babagee avatar

babagee

New Zenner

Join Date:
Dec 2005
Location:
The Land of Enchantment
Posts:
49
Plugin Contributions:
0

Re: buttons for template override not working for me

yes : "custom" is the name of my template.

26 May 2011, 12:07 AM
#4
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,180
Plugin Contributions:
0

Re: buttons for template override not working for me

a link to your web site please without the http://www.

26 May 2011, 12:08 AM
#5
babagee avatar

babagee

New Zenner

Join Date:
Dec 2005
Location:
The Land of Enchantment
Posts:
49
Plugin Contributions:
0

Re: buttons for template override not working for me

This is really strange: even if I load one of my custom buttons into the original includes / templates / templates-default / buttons / english folder to over-write the default gif file ... even that doesn't work!

Something very strange is going on, here.

I tried a different FTP tool, to upload, in case that was it. Nope!

Any ideas, anyone?

26 May 2011, 12:11 AM
#6
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,180
Plugin Contributions:
0

Re: buttons for template override not working for me

link to site please, and you must change the file permissions to the folder...

26 May 2011, 12:11 AM
#7
babagee avatar

babagee

New Zenner

Join Date:
Dec 2005
Location:
The Land of Enchantment
Posts:
49
Plugin Contributions:
0

Re: buttons for template override not working for me

OK link to site:

pregnantearth.com/NEW_ART_STORE

Thanks for taking a look for me.

26 May 2011, 12:17 AM
#8
babagee avatar

babagee

New Zenner

Join Date:
Dec 2005
Location:
The Land of Enchantment
Posts:
49
Plugin Contributions:
0

Re: buttons for template override not working for me

File permissions have been 755 all along .... good for me to read, write and execute.

26 May 2011, 12:24 AM
#9
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,180
Plugin Contributions:
0

Re: buttons for template override not working for me

This is the path I see when I click on the button called listing:

NEW_ART_STORE/includes/templates/template_default/buttons/english/button_return_to_product_list.gifand this is the stylesheet.css
NEW_ART_STORE/includes/templates/custom/css/stylesheet.cssSo you should see this folder layout:
And you have place the new buttons here in the english folder?
NEW_ART_STORE/includes/ templates/ custom/ buttons/ english

26 May 2011, 12:34 AM
#10
babagee avatar

babagee

New Zenner

Join Date:
Dec 2005
Location:
The Land of Enchantment
Posts:
49
Plugin Contributions:
0

Re: buttons for template override not working for me

Yes the new override buttons have been placed into: NEW_ART_STORE/includes/ templates/ custom/ buttons/ english

This is correct, yes?

Might this be some sort of weird bug .. because I turned on and then off again, the CSS buttons option in admin / configuration / layout settings ??????

Completely exasperated .... why doesn't the file I over-wrote in templates/buttons/english even not work? It just makes no sense at all.

Is it because the buttons are a slightly different size than the default ones? They're all gifs.

Is there some setting I don't know about in the admin?
Permissions for the relevant folders set to 755. Correct, yes?

Help!

26 May 2011, 12:38 AM
#11
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,180
Plugin Contributions:
0

Re: buttons for template override not working for me

What button generator did you use????
And do they match zen cart name?
Example: button_return_to_product_list.gif

Did you look at one of the buttons you have uploaded in the custom folder to see it is correct...

26 May 2011, 12:55 AM
#12
babagee avatar

babagee

New Zenner

Join Date:
Dec 2005
Location:
The Land of Enchantment
Posts:
49
Plugin Contributions:
0

Re: buttons for template override not working for me

Photoshop CS4 ... can't be bothered trying to figure out how these generators work. Have done this with an older version of Zen and never ran into any problems. I need to change the text on quite a few of the buttons .. otherwise I'd use the CSS way.

Yes, all the buttons match the zen cart namings: eg: button_add_to_cart.gif etc.

Yes, already checked that the uploaded files are looking as designed ... should be all systems "go" !!!

?????????

26 May 2011, 1:07 AM
#13
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,180
Plugin Contributions:
0

Re: buttons for template override not working for me

The button to add to cart is: button_in_cart.gif

Make a funky button quick for tell a friend and upload please.. > button_TellAFriend.gif

26 May 2011, 2:57 AM
#14
babagee avatar

babagee

New Zenner

Join Date:
Dec 2005
Location:
The Land of Enchantment
Posts:
49
Plugin Contributions:
0

Re: buttons for template override not working for me

In the Zen v.1.3.9h folder of templates / templates-default/buttons/english the button to add to cart is called "button_add_to_cart.gif"

I did as you suggested: created a button for tell a friend and it loaded and it shows up!!!!! see here: http://pregnantearth.com/NEW_ART_STORE/index.php?main_page=product_info&cPath=1&products_id=1

So this begs the question: do I have the correct file names?

Here is the php content of my button_names.php file - they all match the names of the images files in the templates-default/buttons/english folder

define('BUTTON_IMAGE_ADD_TO_CART', 'button_add_to_cart.gif');
define('BUTTON_IMAGE_ADD_ADDRESS', 'button_add_address.gif');
define('BUTTON_IMAGE_ADD_PRODUCTS_TO_CART','button_add_selected.gif');
define('BUTTON_IMAGE_BACK', 'button_back.gif');
define('BUTTON_IMAGE_BUY_NOW', 'button_buy_now.gif');
define('BUTTON_IMAGE_CANCEL', 'button_cancel.gif');
define('BUTTON_IMAGE_CHANGE_ADDRESS', 'button_change_address.gif');
define('BUTTON_IMAGE_CHECKOUT', 'button_checkout.gif');
define('BUTTON_IMAGE_CONFIRM_SEND', 'button_confirm_send.gif');
define('BUTTON_IMAGE_CONFIRM_ORDER', 'button_confirm_order.gif');
define('BUTTON_IMAGE_CONTINUE', 'button_continue.gif');
define('BUTTON_IMAGE_CONTINUE_SHOPPING', 'button_continue_shopping.gif');
define('BUTTON_IMAGE_DELETE', 'button_delete.gif');
define('BUTTON_IMAGE_DELETE_SMALL', 'button_delete_small.gif');
define('BUTTON_IMAGE_DOWNLOAD', 'button_download.gif');
define('BUTTON_IMAGE_EDIT_SMALL', 'small_edit.gif');
define('BUTTON_IMAGE_IN_CART', 'button_in_cart.gif');
define('BUTTON_IMAGE_LOGIN', 'button_login.gif');
define('BUTTON_IMAGE_NEXT', 'button_next.gif');
define('BUTTON_IMAGE_PREVIOUS', 'button_prev.gif');
define('BUTTON_IMAGE_REDEEM', 'button_redeem.gif');
define('BUTTON_IMAGE_RETURN_TO_PROD_LIST', 'button_return_to_product_list.gif');
define('BUTTON_IMAGE_REVIEWS', 'button_reviews.gif');
define('BUTTON_IMAGE_SEARCH', 'button_search.gif');
define('BUTTON_IMAGE_SEND', 'button_send.gif');
define('BUTTON_IMAGE_SEND_A_GIFT_CERT', 'button_send_a_gift_cert.gif');
define('BUTTON_IMAGE_SEND_ANOTHER', 'button_send_another.gif');
define('BUTTON_IMAGE_SHIPPING_ESTIMATOR', 'button_shipping_estimator.gif');
define('BUTTON_IMAGE_SOLD_OUT','button_sold_out.gif');
define('BUTTON_IMAGE_SOLD_OUT_SMALL','button_sold_out_sm.gif');
define('BUTTON_IMAGE_SUBMIT', 'button_submit.gif');
define('BUTTON_IMAGE_TELL_A_FRIEND', 'button_tell_a_friend.gif');
define('BUTTON_IMAGE_TELLAFRIEND', 'button_TellAFriend.gif');
define('BUTTON_IMAGE_UNSUBSCRIBE', 'button_unsubscribe.gif');
define('BUTTON_IMAGE_UPDATE', 'button_update.gif');
define('BUTTON_IMAGE_VIEW_SMALL', 'button_view.gif');
define('BUTTON_IMAGE_WRITE_REVIEW', 'button_write_review.gif');

define('BUTTON_IMAGE_READ_REVIEWS', 'button_read_reviews.gif');
define('BUTTON_IMAGE_GOTO_PROD_DETAILS', 'button_goto_prod_details.gif');
define('BUTTON_IMAGE_MORE_REVIEWS', 'button_more_reviews.gif');
define('BUTTON_IMAGE_CONTINUE_CHECKOUT', 'button_continue_checkout.gif');

??????

Thanks for your patience .... and assistance. It is not clear to me why this "tell a friend" button shows up and the "add cart" and "search" buttons don't (they're the two I've created created and am testing.)

Any enlightenment on this?

26 May 2011, 3:02 AM
#15
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,180
Plugin Contributions:
0

Re: buttons for template override not working for me

The add this to my cart button is called: > button_in_cart.gif

26 May 2011, 3:11 AM
#16
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,180
Plugin Contributions:
0

Re: buttons for template override not working for me

This tutorial explains how to change the sidebox seach button to an image..

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

26 May 2011, 4:19 AM
#17
babagee avatar

babagee

New Zenner

Join Date:
Dec 2005
Location:
The Land of Enchantment
Posts:
49
Plugin Contributions:
0

Re: buttons for template override not working for me

THANK-YOU! Got it sorted!

I would have to pick the two buttons to test that I had ambiguity with .... didn't realize that button_in_cart.gif was the one I was looking at!

Changed the tpl_search.php to call an image and all is well and working, now!

Appreciating your patience and perseverance!

26 May 2011, 4:23 AM
#18
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,180
Plugin Contributions:
0

Re: buttons for template override not working for me

Your welcome and ty for posting your solution...

26 May 2011, 5:54 PM
#20
babagee avatar

babagee

New Zenner

Join Date:
Dec 2005
Location:
The Land of Enchantment
Posts:
49
Plugin Contributions:
0

Re: buttons for template override not working for me

Yes, thanks nigelt74 that seacrh button was created to be a transparent gif .. but not looking that way is it ... will re-create when I get a mo'. Thanks.

RE, Haredo's suggestion: SOLUTION : there are two buttons that both look the same, saying "Add this to my cart" .. but they show up in different places: 1) button-in-cart.gif is the button that shows up on the products pages .... 2) button_add_to_cart.gif must show up else where.

Here's the code for turning the search button in a side box into an image: (Place this code into a copy of template_default / sideboxes/tpl-search.php (use override) and then tweak it to get it to layout as you desire.)

################################################################################____

<?php /** * Side Box Template * * @package templateSystem * @copyright Copyright 2003-2006 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: tpl_search.php 4142 2006-08-15 04:32:54Z drbyte $ */ $content = ""; $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent centeredContent">'; $content .= zen_draw_form('quick_find', zen_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get'); $content .= zen_draw_hidden_field('main_page',FILENAME_ADVANCED_SEARCH_RESULT); $content .= zen_draw_hidden_field('search_in_description', '1') . zen_hide_session_id(); if (strtolower(IMAGE_USE_CSS_BUTTONS) == 'yes') { $content .= zen_draw_input_field('keyword', '', 'size="18" maxlength="100" style="width: ' . ($column_width-30) . 'px"') . '<br />' . zen_image_submit (BUTTON_IMAGE_SEARCH,HEADER_SEARCH_BUTTON); $content .= '<br /><a href="' . zen_href_link(FILENAME_ADVANCED_SEARCH) . '">' . BOX_SEARCH_ADVANCED_SEARCH . '</a>'; } else { $content .= zen_draw_input_field('keyword', '', 'size="18" maxlength="100" style="width: ' . ($column_width-30) . 'px" value="' . HEADER_SEARCH_DEFAULT_TEXT . '" onfocus="if (this.value == \'' . HEADER_SEARCH_DEFAULT_TEXT . '\') this.value = \'\';" onblur="if (this.value == \'\') this.value = \'' . HEADER_SEARCH_DEFAULT_TEXT . '\';"') . '<br />' .zen_image_submit(BUTTON_IMAGE_SEARCH,HEADER_SEARCH_BUTTON,'class="input" style="position:relative;left: 5px; bottom: 4px"'); $content .= '<br />Or try  <a href="' . zen_href_link(FILENAME_ADVANCED_SEARCH) . '">' . BOX_SEARCH_ADVANCED_SEARCH . '</a>';} $content .= "</form>"; $content .= '</div>'; ?>

##########################################################################################____

Blessings!