- Posts: 32
- Thank you received: 0
Shopping Cart Module Button Styling
- waveforcemedia
-
Topic Author
- Offline
Does anyone know how to change the CSS styling of the "Proceed to Checkout" button on the Hikashop Cart MODULE?
It if pulling off the:
a.hikashop_cart_button "class" (frontend_default.css file)
I don't want it to have the same styling as my "add to cart".
Would it make more sense to create another separate div id or class and adjust the php file in the module folder? If so, what code would I need to adjust/input in that php file?
Please Log in or Create an account to join the conversation.
You can already have different button styles just with CSS. You don't have to edit any php.
We did it in the CSS of the template of our demo website:
demo.hikashop.com
For example, that's the code we used for the add to cart button which has a different style from the other hikashop buttons on the website:
.hikashop_product_quantity_main .hikashop_product_stock .button {
color: #167E93;
font-weight: bold;
background-image: url(../images/add_cart.png);
background-repeat: no-repeat;
background-position: right;
height: 32px;
padding-right: 40px;
background-color: transparent;
cursor: pointer;
}
Please Log in or Create an account to join the conversation.
- waveforcemedia
-
Topic Author
- Offline
- Posts: 32
- Thank you received: 0
I guess my issue is trying to get that module to use that different css styling. Which css file do I edit? Do I add a css class suffix in the backend module field?
I think I'm confused as to knowing how do I let that specific "proceed to cart" link go to the css styling you guys did on the demo.hikashop.com? Because right now, if I just copy that code, it won't do anything, won't I need to assign that "proceed to checkout" to the newly created class? How do I do that?
It seems like if I edit that file, the "add to cart" will also be affected.
Here is the demo site:
dd.smiwebsites.com - older version of site but button styling is still the same.
Using JAt3 template.
Please Log in or Create an account to join the conversation.
.hikashop_cart .hikashop_cart_input_button {
background: url(../images/cart_ok.png) no-repeat;
background-color: transparent;
width: 172px;
height: 23px;
color: white;
font-weight: bold;
cursor: pointer;
font-size: 12px;
}
You need to add that in the CSS file of either your template or HikaShop. On our demo website we did it in the CSS of the template. If you want to do it in HikaShop, you need to go in the tab Display of the configuration and edit the front end CSS file and add it there. Don't forget to save the configuration as well after your modification.
Please Log in or Create an account to join the conversation.
- waveforcemedia
-
Topic Author
- Offline
- Posts: 32
- Thank you received: 0
I don't think I'm retarded but am just not getting your solution. I tried inputting the same exact css code into the frontend in the config, and even tried it with the frontend-default.css in the media folder.
When I firebug the "proceed to checkout", that specific module is pulling from the same style of "add to cart". I can see if the proceed to checkout was asking for another divid or style, then it would be easy to edit via css by either the template or frontend file.
AM I missing something here?
Thanks for your help
Please Log in or Create an account to join the conversation.
You don't need to have directly a unique id on the element to style it independently from the others. As long as at least one parent element of your element has a unique id you can style it independently.
Look at the code I posted, it contains the line:
.hikashop_cart .hikashop_cart_input_button
which means that the CSS will only apply to the elements with the class hikashop_cart_input_button and only for those which are in an element of the class hikashop_cart. And the only element with that propriety is the proceed to checkout button of the cart module.
If it doesn't work, it means that you're not doing it properly, at the good place or that your template is somehow overriding the styles. I can assure you that this method works. We even use it on our demo website...
If you can't make it work please post a link to your page so that we can see what you did.
Please Log in or Create an account to join the conversation.
- waveforcemedia
-
Topic Author
- Offline
- Posts: 32
- Thank you received: 0
Link:
www.dd2.smiwebsites.com
If you could tell me what's wrong, that would be great.
Please Log in or Create an account to join the conversation.
.hikashop_cart .hikashop_cart_button{
color: #000 !important;
}
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Sorry but I don't understand your issue. Do you want to customize the cart module in order to display an icon ?
Please Log in or Create an account to join the conversation.
ADD_TO_CART="<i class="icon-cart" > </i>AÑADIR AL CARRITO"
La clase icon-cart mostrará a partir de ahora un icono de carrito en el botón añadir al carrito.
Joomla! 3 viene con Bootstrap (hoy 2.3) , que facilita la construcción de contenido predefinido, como los iconos.
Te dejo el enlace donde tienes muchas otras combinaciones de iconos
getbootstrap.com/2.3.2/base-css.html#icons
Icons by Glyphicons Icon glyphs 140 icons in sprite form, available in dark gray (default) and... -
getbootstrap.com
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
Can you show me where do you exactly want to add your icon through some screenshot for example ?
Thanks.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Changing the background of an element and replacing the "the cart is empty" by an image is two things quite different.
Did you read our documentation on the customization of the display ?
www.hikashop.com/support/support/documen...ize-the-display.html
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Yes. Click on the URL instead of copy/pasting the text and it will work.
Please Log in or Create an account to join the conversation.
I tried using the CSS code I found in a related posting but it seem to not work.
I"m posting the CSS here.
#hikashop_cart .icon-cart {
background-image: url('/images/shoppingcart.png');
}
I also would prefer to change the font type, size and colour attributes of the cart when displaying "Total: $xx.xx". What attribute do I change?
Thank you in advance!
Please Log in or Create an account to join the conversation.