dropdown cart look and behaviour

  • Posts: 47
  • Thank you received: 4
8 years 2 months ago #265570

-- url of the page with the problem -- : 144.208.70.12/~phil3/index.php/shop/category/21-books?popup=1
-- HikaShop version -- : 3.0.1
-- Joomla version -- : 3.6.5
-- PHP version -- : 5.6
-- Browser(s) name and version -- : all

Hi Hikashop,
i was wondering if it is possible to change the way the dropdown cart works.
i have added an icon to the cart (following forum posts) - but where the link shows the quantity and price (this obviously triggers the dropdown cart)
i would simply like the words "your cart" instead of the quantity and price.

so the visitor clicks - Your Cart and the dropdown cart triggers (idealy clicking the image would also trigger the dropdown box)

Obviously i would like the dropdown cart to remain the same (ill make it a little wider when i get it working the way i need to

can you help please

thanks

;-)

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

  • Posts: 4820
  • Thank you received: 654
  • MODERATOR
8 years 2 months ago #265585

Hello,

Your needs is possible with settings AND some custom on view cart.php.
1°) First go to Extensions => Modules, then look for "Cart" (with search input), pick "HikaShop Cart Module"
Edit your your HikaShop Options tab and switch off unwanted options and keep needed.

2°) Then, you have to edit your cart view, in Components => HikaShop => Configuration, then on Display dropdown select Views.
Use the three dropdown filters with Poducts/Your Template/Frontend.
Then edit your view in order to add text under some conditions thanks to an if, like :

if(cart not empty) {
   echo "<p>Your Cart</p>";
}

Note that for the second step some Php knowledge is required.
Hope this will help you to custom your cart view

Regards

Last edit: 8 years 2 months ago by Philip.

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

  • Posts: 47
  • Thank you received: 4
8 years 2 months ago #265631

Hi Philip,
thanks so much for your detailed reply

i have edited quite a few view files (in other sites) but i must be doing something wrong - i keep getting a php error.

perhaps i am putting it in wrong place

would you mind letting me know where i need to place the line
if(cart not empty) {
echo "<p>Your Cart</p>";
}

so that i don't get an error

thanks again ;-)

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

  • Posts: 83989
  • Thank you received: 13604
  • MODERATOR
8 years 2 months ago #265639

Hi,

When Philip gave you is a pseudo-code, not something you can just paste in the view file.
You need to change the text "cart not empty" by PHP code of your own. That's why he said that you need some PHP knowledge.
Please understand that such customization is outside the user support we provide.

Now, Philip didn't think about it but you actually don't need to edit any code, in order to do what you want.
The X items for X text of the cart module comes from a translation string. So if you want to replace it with something else, just use a translation override in order to change that text:
X_ITEMS_FOR_X="%s items for %s"
X_ITEM_FOR_X="%s item for %s"
www.hikashop.com/download/languages.html#modify

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

  • Posts: 47
  • Thank you received: 4
8 years 2 months ago #265724

Thanks Nicolas - thats got it!
- always appreciate your help
;-)

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

Time to create page: 0.058 seconds
Powered by Kunena Forum