cart icon text&position customization into menu item

  • Posts: 19
  • Thank you received: 1
3 years 5 months ago #333029

-- HikaShop version -- : HikaShop Starter 4.4.2
-- Joomla version -- : 3.9.27
-- PHP version -- : 7.4.3
-- Browser(s) name and version -- : Chrome Versión 90.0.4430.212 (Build oficial) (64 bits)

Hi,

I have followed several forum posts ( www.hikashop.com/forum/4-how-to/878588-a...ge-on-mini-cart.html and www.hikashop.com/forum/install-update/89...rt-icon-in-menu.html ) to achieve placing cart icon into item mneu using mini-cart module inserted with tag from modules anywhere, see picture_1 attached.

Lenguaje overrides used are:
CART_EMPTY="<img src=' /bodegasanmiguel/images/iconos/cart_icon_red.png ' />"
X_ITEM_FOR_X="<img src=' /bodegasanmiguel/images/iconos/cart_icon_red.png ' /> %s producto por %s"
X_ITEMS_FOR_X="<img src=' /bodegasanmiguel/images/iconos/cart_icon_red.png ' /> %s productos por %s"

I have 2 questions:
1st.- how can I only show the total price text, as in desired picture_2 attached?
2nd.- how can I place cart icon and total price text in the same line one as picture_2?

Your help will be welcome.

Ricardo

Attachments:

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
3 years 5 months ago #333030

Hi,

1. You can adapt your translation overrides.
For example, you could have:

CART_EMPTY="<img src=' /bodegasanmiguel/images/iconos/cart_icon_red.png ' />"
X_ITEM_FOR_X="<img src=' /bodegasanmiguel/images/iconos/cart_icon_red.png ' /> %2$s"
X_ITEMS_FOR_X="<img src=' /bodegasanmiguel/images/iconos/cart_icon_red.png ' /> %2$s"

2. It will require some CSS code to do that.
What CSS code to use depends on the HTML in that area and the CSS already added by your template. So I can't say for sure the exact CSS code you would need to add as you didn't provide the URL of that page.
Here is the documentation page where we explain how to add custom CSS to your HikaShop:
www.hikashop.com/support/documentation/1...ize-the-display.html

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

  • Posts: 19
  • Thank you received: 1
3 years 5 months ago #333045

Hi Nicolas:
Thanks for your fast reply.
- your tip for first doubt it works perfect, although I don´t understand the syntax. is there any link where is it documented?
- 2nd doubt, place price at the side of the icon: sorry, i didn´t provide url, you can access directly to the online shop bodegasanmiguel.es/index.php/es/tienda-d-2/a-3 I will appreciate your help
thanks in advance,
Ricardo

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

  • Posts: 19
  • Thank you received: 1
3 years 5 months ago #333063

Hi Nicolas:
Don´t worry about 2nd point, it is solved, just for rest of the people, to place total import side by side to cart icon you only need to add some css class (in my cas eI created new class "iconocarrito" with display: inline) to your translation override, like:

CART_EMPTY="<img class='iconocarrito' src=' /bodegasanmiguel/images/iconos/cart_icon_red.png ' />"
X_ITEM_FOR_X="<img class='iconocarrito' src=' /bodegasanmiguel/images/iconos/cart_icon_red.png ' /> %2$s"
X_ITEMS_FOR_X="<img class='iconocarrito' src=' /bodegasanmiguel/images/iconos/cart_icon_red.png ' /> %2$s"

and it works.

About 1st point, is there any documentation about that point?

Thanks in advance

Ricardo

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
3 years 5 months ago #333065

Hi,

I'm not sure what you mean.
If you want documentation on translation overrides we have on our end, you can see it here:
www.hikashop.com/download/languages.html#modify
Note that the translation override interface we provide is just a different interface for Joomla's translation override system. You can find documentation about this here: docs.joomla.org/J3.x:Language_Overrides_in_Joomla
Now, this is just the beginner documentation on translation override.
Joomla has also a more advanced documentation page for the details of translation strings here:
docs.joomla.org/Formatted_fields_in_lang...anslation_strings/en
There, you'll find a section "Format argument swapping" about using %2$s to target the second argument of the translation instead of %s.

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

  • Posts: 19
  • Thank you received: 1
3 years 5 months ago #333081

Hi Nicolas,
Thanks, last link is what I needed to understand 1st point.
Regards,
Ricardo

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

Time to create page: 0.065 seconds
Powered by Kunena Forum