Goal on buttons

  • Posts: 102
  • Thank you received: 3
9 years 8 months ago #189797

Hello everyone

I have a little question. In Russia we often use Yandex Metrika, and it has very nice instrument to count clicks on button such as "Place an order", "Add to cart" or on any other button.

But in order to gather that information, i must insert this code "yaCounterXXXXXX.reachGoal('TARGET_NAME', yaParams);" to all "add to cart" buttons and to "place an order", but i cant find where i can do it :blink:

How it must look(example):
<input type="submit" value="Place an order" onclick="yaCounter*******.reachGoal('ORDER'); return true;">

And thanx to all who will try to help.

Last edit: 9 years 8 months ago by Rabbiteggs.

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

  • Posts: 12953
  • Thank you received: 1778
9 years 8 months ago #189813

Hello,
You'll probably be able to do that by editing Hikashop core files or by developing a plugin.
A solution can be to directly edit the line :

$html= '<input type="'.$type.'" class="'.$class.' button hikashop_cart_input_button'.$classname.'" name="'.$map.'" value="'.$name.'" '.$ajax.$options.'/>';
Through the file "administrator\components\com_hikashop\helpers\cart.php".

The following user(s) said Thank You: Rabbiteggs

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

  • Posts: 102
  • Thank you received: 3
9 years 8 months ago #189903

Thank you very much! :)

I have one more question) It's possible to make smart search in hika?

Last edit: 9 years 8 months ago by Rabbiteggs.

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

  • Posts: 26151
  • Thank you received: 4027
  • MODERATOR
9 years 8 months ago #189927

Hi,

Can you please clarify your request ?
What is exactly "smart search" for you ?

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: Rabbiteggs

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

  • Posts: 102
  • Thank you received: 3
9 years 8 months ago #189993

Sure.

For example:
When i have products with "apple" in title and I try to find "apples" he doesn't give me results.
Or i try to find "aples" and here the same situation, how i can solve that issue? At this moment I use ajax search and standard plugin for search in hikashop.

Thnx :)

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

  • Posts: 82726
  • Thank you received: 13341
  • MODERATOR
9 years 8 months ago #190004

Hi,

I don't know of any solution for that, even for other ecommerce solutions or CMSes.
The only thing I know which can do that are the search engines like Google or Bing as it requires a complex dictionary system to be able to find close results of the searches.

The following user(s) said Thank You: Rabbiteggs

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

  • Posts: 102
  • Thank you received: 3
9 years 8 months ago #190033

I'm added in code what i need. But i didn't see in frontend what i added. I check it in cart, product, everywhere, and i see no changes. Maybe i make something wrong?

$html= '<input type="'.$type.'" class="'.$class.' button hikashop_cart_input_button'.$classname.'" onclick="yaCounter25627052.reachGoal(\'ORDER\'); return true;" name="'.$map.'" value="'.$name.'" '.$ajax.$options.'/>';

I need to add that code in "Place an order" button and "add to cart". :)

One more question. I want to know, is it possible to make button "back to previous step" in checkout page at last step, because if somebody want to change adress or telephone number, he can't do that and it's not comfortable.

Thank you for helping guys! :silly:

Last edit: 9 years 8 months ago by Rabbiteggs.

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

  • Posts: 13201
  • Thank you received: 2322
9 years 8 months ago #190065

Hi,

The code you have store content in a php variable. But it don't display that content.
To display this code you need an "echo", like this:

echo '<input type="'.$type.'" class="'.$class.' button hikashop_cart_input_button'.$classname.'" onclick="yaCounter25627052.reachGoal(\'ORDER\'); return true;" name="'.$map.'" value="'.$name.'" '.$ajax.$options.'/>';

Another thing, this code need variables like "$type", "$class", etc. They are not defined in the HikaShop default views, so you have to create them or get their value from somewhere. Please contact the code provider.

Here is documentation to learn how to edit view in HikaShop ;)
www.hikashop.com/support/support/documen...ize-the-display.html

The following user(s) said Thank You: Rabbiteggs

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

  • Posts: 102
  • Thank you received: 3
9 years 8 months ago #190173

Xavier wrote: Here is documentation to learn how to edit view in HikaShop ;)
www.hikashop.com/support/support/documen...ize-the-display.html


Thank you very much!

Last edit: 9 years 8 months ago by Rabbiteggs.

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

  • Posts: 13201
  • Thank you received: 2322
9 years 8 months ago #190176

Hi,

You can edit the view "checkout / step" and add code like:

<input type="button" value="Previous" onclick="window.location = '<?php echo hikashop_completeLink('checkout&task=step&step='.$this->step-1); ?>'; "/>

Last edit: 9 years 8 months ago by Xavier.

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

  • Posts: 102
  • Thank you received: 3
9 years 8 months ago #190566

Thank you,

One more question. Hikashop shows me only 20 items and 20 categories as default, but i want to change it to 25 or more, how i can do it?

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

  • Posts: 13201
  • Thank you received: 2322
9 years 8 months ago #190578

Hi,

To change the number of elements displayed in a listing, you just have to edit the value of the option "Number of items" in the menu/module settings via the menu Display > Content Menus or Content Modules.

The following user(s) said Thank You: Rabbiteggs

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

  • Posts: 102
  • Thank you received: 3
9 years 8 months ago #191012

Hello) It's me again.

I have a little question: how to make quantity change in cart with AJAX, maybe there is solution for that problem? I think i'm not the first man, who want to change quantity in the cart with ajax ^_^

Third is: how to remove "hikashop_checkout_address_right_part", i'm don't need payment, i need only delivery address, i know that i can write "display:none;" but i want to remove it or turn off :) Screenshot with example is below

Attachments:
Last edit: 9 years 8 months ago by Rabbiteggs.

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

  • Posts: 13201
  • Thank you received: 2322
9 years 8 months ago #191029

Hi,

1. That's potentially because in the Display > Custom fields settings you have set a default value for the custom field.

2. You have to enable the option "Use AJAX when possible for add to cart buttons" in Configuration > Main > Advanced settings

The following user(s) said Thank You: Rabbiteggs

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

  • Posts: 102
  • Thank you received: 3
9 years 8 months ago #191089

Xavier wrote: Hi,

1. That's potentially because in the Display > Custom fields settings you have set a default value for the custom field.
2. You have to enable the option "Use AJAX when possible for add to cart buttons" in Configuration > Main > Advanced settings


Ajax in settings is turned on, i mean quantity buttons in checkout, when you already make a order, and in display>custom fields i must set a default value because this field with * :huh:

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

  • Posts: 26151
  • Thank you received: 4027
  • MODERATOR
9 years 8 months ago #191232

Hi,

To remove a default value in a required custom field, you have to empty the setting "default value" and switch the custom field to not required.
Then, you can save the custom field, re-switch the "required" (to yes) and re-save.
The first save will empty the default value and the second save won't put a default value.

This issue will be fix in the next HikaShop release ; I already put a patch few week ago for that.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Time to create page: 0.097 seconds
Powered by Kunena Forum