WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • image as submit button
  • Print
Pages: [1]   Go Down

Author Topic: image as submit button  (Read 5908 times)

Offline msherifam01

  • Posts: 9
image as submit button
« on: January 29, 2014, 09:44:09 AM »
Hi,

In wb bakery module i want to change the submit buttons to image.

original code: <input type="submit" name="add_to_cart" class="mod_bakery_bt_add_f" value="[ADD_TO_CART]" />

my code: <input type="image" src="my source" name="add_to_cart" class="mod_bakery_bt_add_f" value="[ADD_TO_CART]" />

my code does work in chrome but not in IE and Mozilla.

Please advice
Logged

jacobi22

  • Guest
Re: image as submit button
« Reply #1 on: January 29, 2014, 10:15:43 AM »
1. Please use the bakery threads for questions about bakery - thanks

2. use css only für button images. here an example
for my actual shop i use 4 different images with a width from 140px, 175px, 270px and 600px
and a subfolder for the buttons called bakery/images/bakery_buttons

search in your source code for the css-class like
Quote
<input type="submit" name="add_to_cart" class="mod_bakery_bt_add_f" value="[ADD_TO_CART]" />

here my css
Code: [Select]
.mod_bakery_bt_cart_f {
height:30px;
width:140px;
background: url("images/bakery_buttons/menuitem140.png") no-repeat scroll center center transparent;
border: 0 none !important;
cursor: pointer;
padding: 0;
margin-top:32px;
}
Logged

Offline msherifam01

  • Posts: 9
Re: image as submit button
« Reply #2 on: January 29, 2014, 10:26:19 AM »
Sorry for the wrong category..

When i use css as yours it doesnot have any impact.

i am running the code on localhost. will it behave different if i use server?
Logged

jacobi22

  • Guest
Re: image as submit button
« Reply #3 on: January 29, 2014, 10:33:41 AM »
it doesnt work, if you use a code like this
<input type="image"

Quote
When i use css as yours it doesnot have any impact.
i am running the code on localhost. will it behave different if i use server?

no, why?
if its not work on localhost, something goes wrong. check the path to your own button image and clear the browser cache after every code change
Logged

Offline msherifam01

  • Posts: 9
Re: image as submit button
« Reply #4 on: January 29, 2014, 11:25:58 AM »
Thanx buddy...
its working fine...
i didnt register the css. thats why there was no impact when i change css.

<?php
        if(function_exists('register_frontend_m odfiles')) {
                register_frontend_m odfiles('css');
                register_frontend_m odfiles('js');
        }
?>
did this.
work like charm...
Logged

jacobi22

  • Guest
Re: image as submit button
« Reply #5 on: January 29, 2014, 11:32:42 AM »
good job ;-)

use this method for all the other buttons (if you want), i need not all payment methodes, so i've only 17 image buttons in bakery
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • image as submit button
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2