Author Topic: Can little images be added to e.g. View Cart?  (Read 2128 times)

Offline seanie_morris

  • Posts: 287
  • Gender: Male
Can little images be added to e.g. View Cart?
« on: March 10, 2017, 02:48:31 PM »
In /bakery/languages/EN.php there is the line:
Code: [Select]
$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.

Offline jacobi22

  • Posts: 5879
  • Gender: Male
  • Support also via PM or EMail
    • Jacobi22
Re: Can little images be added to e.g. View Cart?
« Reply #1 on: March 10, 2017, 02:58:32 PM »
WB-Backend - Bakery -> Page Settings -> Header

feel free to style this part here

Code: [Select]
<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>
Wer nicht will, findet Gründe, wer will, findet Wege.

Offline freeSbee

  • Moderator
  • ***
  • Posts: 1117
    • BAKERY - Website Baker shop module
Re: Can little images be added to e.g. View Cart?
« Reply #2 on: March 10, 2017, 03:04:37 PM »
Code: [Select]
<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".

Offline seanie_morris

  • Posts: 287
  • Gender: Male
Re: Can little images be added to e.g. View Cart?
« Reply #3 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_di v_cart_bt_f
.mod_bakery_bt_cart _f
.mod_bakery_bt_add_ f

by even just adding the following to see if it works:
Code: [Select]
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?

Offline freeSbee

  • Moderator
  • ***
  • Posts: 1117
    • BAKERY - Website Baker shop module
Re: Can little images be added to e.g. View Cart?
« Reply #4 on: March 13, 2017, 02:27:53 PM »
Yes, as you have already guessed it is overwritten by the
Code: [Select]
.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

Offline seanie_morris

  • Posts: 287
  • Gender: Male
Re: Can little images be added to e.g. View Cart?
« Reply #5 on: March 13, 2017, 07:17:39 PM »
Yes, as you have already guessed it is overwritten by the
Code: [Select]
.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)
:)