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) »
  • Bakery Shop »
  • Pagesettings (overview)
  • Print
Pages: [1]   Go Down

Author Topic: Pagesettings (overview)  (Read 7884 times)

Offline Shefra

  • Posts: 90
  • Gender: Male
Pagesettings (overview)
« on: September 01, 2011, 08:20:20 PM »
Hello,

I want to change the input type from submit to image:

Quote
<form action="[SHOP_URL]" method="post">
<input type="submit" name="view_cart" class="mod_bakery_bt_cart_ f" value="[VIEW_CART]" />
</form>

to

Quote
<form action="[SHOP_URL]" method="post">
<input type="image" src="http://<websitename>/<image.img> name="view_cart" class="mod_bakery_bt_cart_ f"  />
</form>

When i click on the image the webshop is reloaded instead of showing the cart.

Do i overlook something?

Thanks

Frank

Logged

freeSbee

  • Guest
Re: Pagesettings (overview)
« Reply #1 on: September 01, 2011, 08:48:22 PM »
http://www.bakery-shop.ch/#navigation

Regards Christoph
Logged

Offline Shefra

  • Posts: 90
  • Gender: Male
Re: Pagesettings (overview)
« Reply #2 on: September 02, 2011, 09:22:13 AM »
Do i missing something? I read this section but i can use the input type="image" as well but is doesn't work.
Logged

freeSbee

  • Guest
Re: Pagesettings (overview)
« Reply #3 on: September 02, 2011, 10:30:30 AM »
Please post or pm a link to the site.

Regards Christoph
Logged

Offline DarkViper

  • Forum administrator
  • *****
  • Posts: 3087
  • Gender: Female
Re: Pagesettings (overview)
« Reply #4 on: September 02, 2011, 10:50:17 AM »
Quote from: Shefra on September 01, 2011, 08:20:20 PM
Hello,

I want to change the input type from submit to image:

Quote
<form action="[SHOP_URL]" method="post">
<input type="submit" name="view_cart" class="mod_bakery_bt_cart_ f" value="[VIEW_CART]" />
</form>

to

Quote
<form action="[SHOP_URL]" method="post">
<input type="image" src="http://<websitename>/<image.img> name="view_cart" class="mod_bakery_bt_cart_ f"  />
</form>

When i click on the image the webshop is reloaded instead of showing the cart.

Do i overlook something?

Thanks

Frank




so it should work.

Code: [Select]
<form action="[SHOP_URL]" method="post">
    <input type="hidden" name="view_cart" value="[VIEW_CART]" />
    <input type="image" src="http://websitename/image.img" name="view_cart_submit" class="mod_bakery_bt_cart_f" alt="[VIEW_CART]" />
</form>

why?
Your Input-Image-Tag does not submit a value ([VIEW_CHART]), that's why the script goes the default direktion (reload).
By the Hidden-Input-Tag now the value for $_POST['view_cart'] is submitted explicitly and all should work well again.
PS: an image needs the Alt-property also.
« Last Edit: September 02, 2011, 10:56:40 AM by DarkViper »
Logged
Der blaue Planet - er ist nicht unser Eigentum - wir haben ihn nur von unseren Nachkommen geliehen

"We need education to cope with digitalization - and NOT the digitalization of education.!"

Tägliches Stoßgebet: Oh Herr, wirf Hirn vom Himmel !

freeSbee

  • Guest
Re: Pagesettings (overview)
« Reply #5 on: September 02, 2011, 11:43:18 AM »
Bakery just uses the name attribute for controlling. But since the value attribute hast to be set and must not be empty just add it to the <input type="image" ... /> tag:

Code: [Select]
<form action="[SHOP_URL]" method="post">
<input type="image" src="http://www.yourwebsite/your_directory/your_image.img>" name="view_cart" value="[VIEW_CART]" alt="[VIEW_CART]" class="mod_bakery_bt_cart_ f" />
</form>

Regards Christoph
« Last Edit: September 02, 2011, 11:57:50 AM by freeSbee »
Logged

Offline DarkViper

  • Forum administrator
  • *****
  • Posts: 3087
  • Gender: Female
Re: Pagesettings (overview)
« Reply #6 on: September 02, 2011, 12:03:12 PM »
value = "" inside an input tag of type image can be a trap to run in an issuse.

Quote
Note:
For graphical buttons not only of any existing value in the attribute value is transferred, but additionally the coordinates of the click on the image. The (as of PHP from name_x / name_y) states, two additional values ​​sent in the form and Name.x name.y. IE will only send the coordinates.
(translated by google from german website SelfHTML

so the better and more secure solution is to use a input-hidden tag.
« Last Edit: September 02, 2011, 12:05:04 PM by DarkViper »
Logged
Der blaue Planet - er ist nicht unser Eigentum - wir haben ihn nur von unseren Nachkommen geliehen

"We need education to cope with digitalization - and NOT the digitalization of education.!"

Tägliches Stoßgebet: Oh Herr, wirf Hirn vom Himmel !

freeSbee

  • Guest
Re: Pagesettings (overview)
« Reply #7 on: September 02, 2011, 01:19:22 PM »
Quote from: DarkViper on September 02, 2011, 12:03:12 PM
value = "" inside an input tag of type image can be a trap to run in an issuse.

Since version 1.5.3 Bakery provides a bugfix for IE, that takes car of that:
http://www.bakery-shop.ch/#version_153

Regards Christoph
Logged

jacobi22

  • Guest
Re: Pagesettings (overview)
« Reply #8 on: September 02, 2011, 05:55:17 PM »
I use CSS with the Original Code (no Image for Submit-Button inside the Code)

my CSS for the submit-Button
....
input[type=submit], input[type=reset] {
        background: #ffffff url(../img/submit_button.png) repeat-x;
        color: #000000;
}
input[type=submit]:hover, input[type=reset]:hover  {
        background: #ffffff url(../img/submit_button_on.png) repeat-x;
        color: #000000;
}
-----
Logged

Offline Shefra

  • Posts: 90
  • Gender: Male
Re: Pagesettings (overview)
« Reply #9 on: September 05, 2011, 09:24:23 AM »
Thanks for the answers. DarkViper your solution did it....

Thanks again.....

Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Bakery Shop »
  • Pagesettings (overview)
 

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