Product price CSS in cart

  • Posts: 279
  • Thank you received: 1
11 years 6 months ago #133615

-- url of the page with the problem -- : digitalguarddawg.com
-- 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 -

span.hikashop_product_price_full{
  text-align: center;
  font-weight:bold;
  [color=#ff0000][b]font-size: 20px;[/b][/color]
  display:block;
  margin-bottom:5px;
  margin-top:10px;
  margin-left:10px;
}

(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.

Last edit: 11 years 6 months ago by trogladyte.

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 6 months ago #133670

Hi,

You can directly apply this property instead of the previous one:

.hikashop_product_page .hikashop_product_price_full{
  text-align: center;
  font-weight:bold;
  font-size: 20px;
  display:block;
  margin-bottom:5px;
  margin-top:10px;
  margin-left:10px;
}

Please Log in or Create an account to join the conversation.

  • Posts: 279
  • Thank you received: 1
11 years 6 months ago #133728

Thanks Xavier. Now, if I apply this directly to the master CSS file it will be overwritten if I upgrade or apply a patch. Where do I go to add this to the CSS file from within HS (I can see the PHP files but cannot identify frontend.css - assuming that's the file this goes in).

Please Log in or Create an account to join the conversation.

  • Posts: 83937
  • Thank you received: 13599
  • MODERATOR
11 years 6 months ago #133748

If you edit the frontend CSS file of HikaShop via our interface in the display tab of the configuration, you won't loose your changes when you update HikaShop.

Please Log in or Create an account to join the conversation.

  • Posts: 279
  • Thank you received: 1
11 years 6 months ago #133759

I added it to the CSS via the Configuration in the backend of HS. It had no affect on the cart display.

www.digitalguarddawg.com

Please Log in or Create an account to join the conversation.

  • Posts: 83937
  • Thank you received: 13599
  • MODERATOR
11 years 6 months ago #133851

I do not see the code proposed by Xavier in the frontend CSS file of HikaShop on your website:
www.digitalguarddawg.com/media/com_hikas...end_custom.css?v=222

Please Log in or Create an account to join the conversation.

  • Posts: 279
  • Thank you received: 1
11 years 6 months ago #133857

Here is a SS showing the code inserted at the end of the frontend.css file.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 83937
  • Thank you received: 13599
  • MODERATOR
11 years 6 months ago #133890

Now I can see it. Simply refresh your browser cache and you will see it too.

Please Log in or Create an account to join the conversation.

  • Posts: 279
  • Thank you received: 1
11 years 6 months ago #133912

I don't. Have tried in Chrome, FF and IE - cleared caches. Still showing the big text.

Please Log in or Create an account to join the conversation.

  • Posts: 83937
  • Thank you received: 13599
  • MODERATOR
11 years 6 months ago #133919

What big text ?
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.

  • Posts: 279
  • Thank you received: 1
11 years 6 months ago #134884

Sorry - I thought my first post was precise - I want small font/text in the cart (NOT what's showing in the image) and the big font/text in the products - like it is now and shows in the image product.jpg.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
11 years 6 months ago #134913

Hi,
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.

  • Posts: 279
  • Thank you received: 1
11 years 6 months ago #135014

I'm not really sure how to explain it any more than it is in this thread. And I gave screenshots of the shopping cart and the product page in my last post, but I'll try to explain it more.

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:

span.hikashop_product_price_full{
  text-align: center;
  font-weight:bold;
  [color=#ff0000][b]font-size: 20px;[/b][/color]
  display:block;
  margin-bottom:5px;
  margin-top:10px;
  margin-left:10px;
}

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:
.hikashop_product_page .hikashop_product_price_full{
  text-align: center;
  font-weight:bold;
  font-size: 20px;
  display:block;
  margin-bottom:5px;
  margin-top:10px;
  margin-left:10px;
}

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.

Last edit: 11 years 6 months ago by trogladyte.

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
11 years 6 months ago #135151

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.

Ok, I finaly understood, the problem is coming from this code of your "media/com_hikashop/css/frontend_custom.css" file :
span.hikashop_product_price_full {
text-align: center;
font-weight: bold;
font-size: 20px;
}

Last edit: 11 years 6 months ago by Mohamed Thelji.

Please Log in or Create an account to join the conversation.

  • Posts: 279
  • Thank you received: 1
11 years 6 months ago #135224

I know that code is causing the cart to display with the larger font size - I said that in a couple of my posts. Please reread what I'm asking for.

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.

  • Posts: 83937
  • Thank you received: 13599
  • MODERATOR
11 years 6 months ago #135280

The code given by Xavier is not to make the price of the cart module smaller, but to make the price of the product page bigger, which is what we tought you wanted to do.
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.

  • Posts: 279
  • Thank you received: 1
11 years 6 months ago #135284

Well, it was really clear first up, but anyway. So where do I put this code? I really appreciate the help I've received, but the whole answer up front would save everyone a lot of time and angst. I want to add this in the backend of HS so updates don't overwrite it, but I have no idea where to add it.

The full story would be great.

Please Log in or Create an account to join the conversation.

  • Posts: 83937
  • Thank you received: 13599
  • MODERATOR
11 years 6 months ago #135285

The first answer of Xavier was the correct one. But it seems that you didn't read it completely.
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.

  • Posts: 279
  • Thank you received: 1
11 years 6 months ago #135286

Well I'm not the only confused person Nicolas. Your post of 1 week 3 days didn't pick up the mistake either so please don't lay all the blame on me. I'm no programmer and HS is extremely complicated for someone like me. That's why we ask questions and expect clear replies - especially if we've paid for a product. If it was free, I'd shrug and move on, but it isn't.

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
11 years 6 months ago #135311

Sorry for the time it took to solve your issue, Nicolas wasn't blaming you but explaining the situation. Also, note that CSS customization isn't included on our support.
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.

Time to create page: 0.151 seconds
Powered by Kunena Forum