WebsiteBaker Community Forum (upd)

WebsiteBaker Support (2.8.x) => Bakery Shop => Topic started by: seanie_morris on March 10, 2017, 02:48:31 PM

Title: Can little images be added to e.g. View Cart?
Post by: seanie_morris on March 10, 2017, 02:48:31 PM
In /bakery/languages/EN.php there is the line:
$MOD_BAKERY['TXT_VIEW_CART'] = 'VIEW MY CART ITEMS';

How can I add a little trolley or basket image to it? What are the files for me to look into and try it myself?

Seanie.
Title: Re: Can little images be added to e.g. View Cart?
Post by: Gast on March 10, 2017, 02:58:32 PM
WB-Backend - Bakery -> Page Settings -> Header

feel free to style this part here

<div class="mod_bakery_main_div_cart_bt_f">
<form action="[SHOP_URL]" method="post">
<input type="submit" name="view_cart" class="mod_bakery_bt_cart_f" value="[VIEW_CART]" />
</form>
</div>
Title: Re: Can little images be added to e.g. View Cart?
Post by: freeSbee on March 10, 2017, 03:04:37 PM
<input type="submit" name="view_cart" class="mod_bakery_bt_cart_f" value="VIEW MY CART ITEMS">

Or add the icon to the frontend.css style sheet as a background image using the class "mod_bakery_bt_cart_f".
Title: Re: Can little images be added to e.g. View Cart?
Post by: seanie_morris on March 13, 2017, 11:31:11 AM
That's what I thought guys, so I have been trying the CSS for the rules in bakery/frontend.css:

.mod_bakery_main_div_cart_bt_f
.mod_bakery_bt_cart_f
.mod_bakery_bt_add_f

by even just adding the following to see if it works:
background-image: url("../images/shopping-cart.png"); **and also adding a direct path link to the image**
background-position: left center;
background-repeat: no-repeat;
text-align: right;


but no image will display. In fact, the text on the buttons doesn't change position either, and remains centered in their blue boxes. The direct path link will show the image in the browser. Is there a rule overwriting a change in CSS somewhere?
Title: Re: Can little images be added to e.g. View Cart?
Post by: freeSbee on March 13, 2017, 02:27:53 PM
Yes, as you have already guessed it is overwritten by the
.form input[type="submit"] roule (see /templates/overdrive/css/style.css at line 618).

Use the developer tools of your favorite browser to get more into cascading roules and see what is going on.
https://www.google.ch/search?q=browser+developer+tools
Title: Re: Can little images be added to e.g. View Cart?
Post by: seanie_morris on March 13, 2017, 07:17:39 PM
Quote from: freeSbee on March 13, 2017, 02:27:53 PM
Yes, as you have already guessed it is overwritten by the
.form input[type="submit"] roule (see /templates/overdrive/css/style.css at line 618).

Use the developer tools of your favorite browser to get more into cascading roules and see what is going on.
https://www.google.ch/search?q=browser+developer+tools

Excellent, thank you. I will study that and learn more again through developer tools, thanks for the pointer!  8-) (Y)
:)