IP ADDRESS AND GEOLOCATION PLUGIN

  • Posts: 120
  • Thank you received: 1
11 years 2 weeks ago #131387

Hi!

Please refer to the attached screenshot, where IP field is empty. Don't you know why it does not identify IP address? Is it possible to track IP addresses of unregistered customers in their carts?

Also, my Geolocation plugin does not show location. (May be the same reason?).

-- HikaShop version -- : 2.2.0
-- Joomla version -- : 3.1.1
-- PHP version -- : 5.3


Attachments:
Last edit: 11 years 2 weeks ago by watashi.

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

  • Posts: 13201
  • Thank you received: 2322
11 years 2 weeks ago #131431

Hi,

The IP address is only the IP get when the user create his account on your website.
So for guest cart, there is no IP stored.

You can add this feature by making a plugin based on the function "onBeforeCartUpdate(&$cartClass,&$cart,$product_id,$quantity,$add,$type,$resetCartWhenUpdate,$force,&$do)".
Add a column in the table "#__hikashop_cart" like "cart_ip" and then in the plugin, get the IP of the customer, and add it into the variable "$cart->cart_ip".

Finally, you will have to edit the view "cart / form" in the backend template to display the cart value instead of the user one for the IP.

Here is some documentation for the plugin:
www.hikashop.com/support/documentation/6...umentation.html#cart

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

Time to create page: 0.073 seconds
Powered by Kunena Forum