- Posts: 279
- Thank you received: 1
Product price CSS in cart
- trogladyte
-
Topic Author
- Offline
-- HikaShop version -- : 2.2.2
-- Joomla version -- : 2.5.16
-- PHP version -- : 5.3.x
The client wanted the prices displayed in a larger font size on the product pages. This I accomplished by adding a line to frontend.custom.css -
(also changed text-align: left to center)
What I didn't foresee was that the pricing in the cart also uses this css block. Now I can easily copy the whole block, delete the font-size attribute, change align back to left, then give it a new name (for example span.hikashop_product_price_full_cart), but I don't know which PHP file to edit to insert the new css name and where in the file to do so.
Can someone point me at the right place please? Thanks.
Please Log in or Create an account to join the conversation.
You can directly apply this property instead of the previous one:
Please Log in or Create an account to join the conversation.
- trogladyte
-
Topic Author
- Offline
- Posts: 279
- Thank you received: 1
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- trogladyte
-
Topic Author
- Offline
- Posts: 279
- Thank you received: 1
www.digitalguarddawg.com
Please Log in or Create an account to join the conversation.
www.digitalguarddawg.com/media/com_hikas...end_custom.css?v=222
Please Log in or Create an account to join the conversation.
- trogladyte
-
Topic Author
- Offline
- Posts: 279
- Thank you received: 1
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- trogladyte
-
Topic Author
- Offline
- Posts: 279
- Thank you received: 1
Please Log in or Create an account to join the conversation.
That CSS is to set a big font on the product price on the product page. That's all. If you want to have small somewhere else, that's something else that you need. Please precise what you're talking about.
Please Log in or Create an account to join the conversation.
- trogladyte
-
Topic Author
- Offline
- Posts: 279
- Thank you received: 1
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
I didn't really understood what you wanted to do, so can you give me more information through some screenshots, and tell me exactly what you want to edit and how you want it to be changed ?
Please Log in or Create an account to join the conversation.
- trogladyte
-
Topic Author
- Offline
- Posts: 279
- Thank you received: 1
URL: www.digitalguarddawg.com
Enterprise v 2.2.2
Starting with a stock standard installation of HS, the client wanted the prices on the PRODUCT PAGES to be larger (see image called h505e4b8.jpg in my last post). So I went into the frontend.custom.css file and changed the following css:
Note the font size changed to 20px and bolded (don't think bold was standard).
What I didn't realize (I think this is actually wrong and should have had it's own css anyway) is that the prices in the shopping cart also use this piece of css to render the shopping cart pricing (see image in previous post called hf2b9905.jpg). I do not want this large pricing in the cart, I want whatever the css was before - might have been more like 12px.
Xavier gave me the following code:
to insert which was meant to fix the cart display issue. I added to frontend.custom.css at the end, but it made no difference. I don't know what to edit (I assume my guess at frontend.custom.css was correct given that Nicolas looked for, and found, my code there) or what to insert to accomplish what I want - big bold text on product pages, small normal text in the cart.
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
Ok, I finaly understood, the problem is coming from this code of your "media/com_hikashop/css/frontend_custom.css" file :What I didn't realize (I think this is actually wrong and should have had it's own css anyway) is that the prices in the shopping cart also use this piece of css to render the shopping cart pricing (see image in previous post called hf2b9905.jpg). I do not want this large pricing in the cart, I want whatever the css was before - might have been more like 12px.
Please Log in or Create an account to join the conversation.
- trogladyte
-
Topic Author
- Offline
- Posts: 279
- Thank you received: 1
I was given other code by Xavier which was supposed to fix this problem but didn't. I just want to know how to normalize the text in the cart - I KNOW it's taking it's css parameters from the same piece of code as the product price.
Please Log in or Create an account to join the conversation.
So it doesn't fix anything regarding the price in the cart.
As Mohamed said, your problem is with the CSS that he gave in his last message and that you added at some other point as it set the price size for all the locations of HikaShop.
If you want to force the price size on the cart module, then you can add such CSS:
.hikashop_cart_module span.hikashop_product_price_full { font-size : 10px !important; }
Please Log in or Create an account to join the conversation.
- trogladyte
-
Topic Author
- Offline
- Posts: 279
- Thank you received: 1
The full story would be great.
Please Log in or Create an account to join the conversation.
You added it after yours, instead of replacing it yours by Xavier's so that the CSS for the price only applies to the price on the product page.
If you had followed his first message, it would have worked from the start.
That's why everyone got confused since Xavier had provided the solution, and that you said that you had done it, but in fact not correctly and then we got confused as you want you wanted to do...
Adding the code I gave is the same as before... Just add it in the frontend CSS in the backend.
Please Log in or Create an account to join the conversation.
- trogladyte
-
Topic Author
- Offline
- Posts: 279
- Thank you received: 1
So, I ask again - WHICH file do I edit in the HS backend to ensure this edit isn't over-written when an upgrade occurs. There are so many files I have no clue where to do it.
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
As it's said on the documentation , you'll just have to add this code through the option "Front-end CSS File" via "Hikashop->System->Configuratin->Display".
Hope this will help you.
Please Log in or Create an account to join the conversation.