Forums / Addon Templates / Modify buttons for spanish

Modify buttons for spanish

Views: 2,696

Results 1 to 14 of 14
29 Dec 2011, 4:22 AM
#1
tinvicemp06 avatar

tinvicemp06

New Zenner

Join Date:
Dec 2011
Posts:
5
Plugin Contributions:
0

Modify buttons for spanish

Hello.
I'm using a template by picaflor azul.
there are buttons provided for the english installation.
however, i already installed a second language (spanish)
and i'm trying to get all the right buttons to be displayed (spanish buttons when spanish is selected)

the product details button for the new products doesn't seem to display the button created under the template/button/spanish folder. instead, it looks like the button source is located at template/images

same happens with the search button in the header.

do i have to edit the newproducts.php file to modify the location of the file?

here's a link. note how the site is in spanish but those two buttons aren't

http://qhatu.museodetextiles.org/shop/index.php?main_page=index&language=es

29 Dec 2011, 6:45 AM
#2
usernamenone avatar

usernamenone

Totally Zenned

Join Date:
Sep 2006
Posts:
541
Plugin Contributions:
0

Re: Modify buttons for spanish

Those buttons were custom coded and not coded for the fact that you would want to use an alternate language

The header button you will need to make one for you button language folder named button_search_header.gif

The other product button was coded for you template and placed in you templates image folder named details.gif you will need to make a custom replacement for your language


Play with it long enough and you will break it.
29 Dec 2011, 9:02 AM
#3
schoolboy avatar

schoolboy

Totally Zenned

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

Re: Modify buttons for spanish

Use Media Kitchen's ONLINE BUTTON GENERATOR. This will create buttons in almost any language.

20 years a Zencart User

30 Dec 2011, 3:21 AM
#4
tinvicemp06 avatar

tinvicemp06

New Zenner

Join Date:
Dec 2011
Posts:
5
Plugin Contributions:
0

Re: Modify buttons for spanish

I have the buttons in spanish already created. that's not the problem
the problem is that the spanish file, the php file, is looking for the image at the wrong location.

30 Dec 2011, 6:39 AM
#5
usernamenone avatar

usernamenone

Totally Zenned

Join Date:
Sep 2006
Posts:
541
Plugin Contributions:
0

Re: Modify buttons for spanish

Then all you need to do is put the images in the location the links call for....... your template images>details.gif and includes/templates/apparel_boutique/buttons/your language/button_search_header.gif


Play with it long enough and you will break it.
30 Dec 2011, 7:33 PM
#6
tinvicemp06 avatar

tinvicemp06

New Zenner

Join Date:
Dec 2011
Posts:
5
Plugin Contributions:
0

Re: Modify buttons for spanish

the actual image "details.gif" is the right image for english pages, if i replace that button with a spanish button, the spanish button will also appear in the english pages.

as for the search product, the image exists in the folder you mentioned, however, this template seems to use a different file to place the search button in the header.

the problem basically is that there's always php files for spanish and english that use images located in the respective folders. however, with this template, there are some files that are unique (no two different files for each language), hence they use specific images. so how can i proceed in order to have the two pages, english and spanish with different images.

do i need to create a second file for the second language for this unique files?

30 Dec 2011, 9:26 PM
#7
usernamenone avatar

usernamenone

Totally Zenned

Join Date:
Sep 2006
Posts:
541
Plugin Contributions:
0

Re: Modify buttons for spanish

tinvicemp06:

the actual image "details.gif" is the right image for english pages, if i replace that button with a spanish button, the spanish button will also appear in the english pages.

Then I would put that code that is in my english folder in my spanish folder!

tinvicemp06:

as for the search product, the image exists in the folder you mentioned, however, this template seems to use a different file to place the search button in the header.

For now I would switch the search button for an arrow or magnifying glass for each language. I know there is a swith to you language code for buttons bit I can't remember what is is right now.


Play with it long enough and you will break it.
31 Dec 2011, 1:46 AM
#8
usernamenone avatar

usernamenone

Totally Zenned

Join Date:
Sep 2006
Posts:
541
Plugin Contributions:
0

Re: Modify buttons for spanish

What is the file name and location of the code for the more info?


Play with it long enough and you will break it.
31 Dec 2011, 7:00 PM
#9
tinvicemp06 avatar

tinvicemp06

New Zenner

Join Date:
Dec 2011
Posts:
5
Plugin Contributions:
0

Re: Modify buttons for spanish

this is the code i was talking about

<div class="product_detail"><a href="'. zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' .zen_image($template->get_template_dir('details.gif', DIR_WS_TEMPLATE, $current_page_base,'images').'/details.gif').'</a></div>'

the code above belongs to the file product_listing.php
located at: includes/modules/my_template

now, it should look for the image located at

includes/templates/my_template/buttons/english

or for spanish

includes/templates/my_template/buttons/spanish

it actually gets the image from

includes/templates/my_template/images

31 Dec 2011, 7:52 PM
#10
usernamenone avatar

usernamenone

Totally Zenned

Join Date:
Sep 2006
Posts:
541
Plugin Contributions:
0

Re: Modify buttons for spanish

OK Thanks, give this a try and replace this code exactly where you gave me that code. (the whole chunck) back up first and if it doesn't work you will need let me know as there is a second option. Just make sure you have a button named details.gif in your spanish button folder.

<div class="product_detail"><a href="'. zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' zen_image_button(BUTTON_IMAGE_DETAILS, BUTTON_DETAILS_ALT) . '</a></div>'

And while you discovered the button on your new products there are 3 others that will need to be changed.

Your featured, specials and product listing


Play with it long enough and you will break it.
31 Dec 2011, 8:36 PM
#11
usernamenone avatar

usernamenone

Totally Zenned

Join Date:
Sep 2006
Posts:
541
Plugin Contributions:
0

Re: Modify buttons for spanish

usernamenone:

OK Thanks, give this a try and replace this code exactly where you gave me that code. (the whole chunck) back up first and if it doesn't work you will need let me know as there is a second option. Just make sure you have a button named details.gif in your spanish button folder.

<div class="product_detail"><a href="'. zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' zen_image_button(BUTTON_IMAGE_DETAILS, BUTTON_DETAILS_ALT) . '</a></div>'

And while you discovered the button on your new products there are 3 others that will need to be changed.

Your featured, specials and product listing

OhOOO
I missed a dot in the code

<div class="product_detail"><a href="'. zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_DETAILS, BUTTON_DETAILS_ALT) . '</a></div>'

this dot >>> need to be there . zen_image_button


Play with it long enough and you will break it.
3 Jan 2012, 2:57 PM
#12
tinvicemp06 avatar

tinvicemp06

New Zenner

Join Date:
Dec 2011
Posts:
5
Plugin Contributions:
0

Re: Modify buttons for spanish

hey thanks a lot

it was not working well, but i changed zen_image_button parameters

it works fine now!

i'll work on the search bar located in the header. last solution, as you mentioned, would be to use an arrow for both languages.

3 Jan 2012, 7:22 PM
#13
usernamenone avatar

usernamenone

Totally Zenned

Join Date:
Sep 2006
Posts:
541
Plugin Contributions:
0

Re: Modify buttons for spanish

Glad to help.

could you post your results of code rework for others searching for a solution,

thanks


Play with it long enough and you will break it.
5 Jan 2012, 7:56 PM
#14
usernamenone avatar

usernamenone

Totally Zenned

Join Date:
Sep 2006
Posts:
541
Plugin Contributions:
0

Re: Modify buttons for spanish

if you have more than one language and you have a template that uses the image folder for their details button
and you want to change it to the button folder here it change this

<div class="product_detail"><a href="'. zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' .zen_image($template->get_template_dir('details.gif', DIR_WS_TEMPLATE, $current_page_base,'images').'/details.gif').'</a></div>

To this

<div class="product_detail"><a href="'. zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'cPath=' . $productsInCategory[$new_products->fields['products_id']] . '&products_id=' . $new_products->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_GOTO_PROD_DETAILS, BUTTON_GOTO_PROD_DETAILS_ALT) . '</a></div>

there is a button named button_goto_prod_details.gif in your language button folder already.

to turn you search button to language specific (you will note the template maker coded for english only.

do this

in your sidebox search folder find code that looks like this

$content .= zen_draw_input_field('keyword', '', 'size="6" class="search-header-box" maxlength="30" style="width: 150px" 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 . '';"') . ' <input type="image" src="includes/templates/CUSTOM/buttons/english/button_search.gif" value="" class="search-header-button" style="width: 75px" />';
}

and change to this

$content .= zen_draw_input_field('keyword', '', 'size="26" maxlength="30" style="width:150px" 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 . '';"').zen_image_submit(BUTTON_IMAGE_SEARCH,HEADER_SEARCH_BUTTON,'class="search-header-button" style="position:relative;left: 0px; bottom: 0px"');
}

Your search button is now out of the english folder and in the button folder

I find the button position left and right up and down sometimes needs to be adjusted


Play with it long enough and you will break it.