*

rooman

  • ****
  • 223 posts
Hello,

How to manually enter the location coordinates on the Itempost page?

I know some people don't like it though it can be useful

<input id="d_coord_lat" type="" name="d_coord_lat" value="12.34567890" />

<input id="d_coord_long" type="" name="d_coord_long" value="11.056000" />

Thank

*

MB Themes

Re: How to manually enter the location coordinates on the Itempost page?
« Reply #1 on: August 08, 2022, 06:12:43 PM »
You just add inpits with correct names, osclass will handle it.
I think yours are OK.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

rooman

  • ****
  • 223 posts
Re: How to manually enter the location coordinates on the Itempost page?
« Reply #2 on: August 08, 2022, 06:25:34 PM »
Thanks for your reply

I tried it
But it does not add data
If the data is there, it should appear somewhere value

Thanks

*

MB Themes

Re: How to manually enter the location coordinates on the Itempost page?
« Reply #3 on: August 08, 2022, 08:06:17 PM »
It will most probably not sow anywhere.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

rooman

  • ****
  • 223 posts
Re: How to manually enter the location coordinates on the Itempost page?
« Reply #4 on: August 15, 2022, 04:32:32 PM »
This code
Code: [Select]
<input id="d_coord_lat" type="" name="d_coord_lat" value="<?php echo osc_item_latitude(); ?>" />
<input id="d_coord_long" type="" name="d_coord_long" value="<?php echo osc_item_longitude(); ?>" />
If there is data for latitude and longitude
It is displayed or zero is displayed
The problem is if you modify the data on the latitude or longitude
It is not stored in the database
Meaning that nothing of the data is changed
Is the code missing something?
Thank you
« Last Edit: August 15, 2022, 04:34:07 PM by rooman »

*

MB Themes

Re: How to manually enter the location coordinates on the Itempost page?
« Reply #5 on: August 16, 2022, 09:56:43 AM »
Code is correct, do not see reason why it would not work.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

mwindey

  • *****
  • 468 posts
Re: How to manually enter the location coordinates on the Itempost page?
« Reply #6 on: August 16, 2022, 10:50:07 AM »
Although this is not useful for me, I've tested the code and works here

*

rooman

  • ****
  • 223 posts
Re: How to manually enter the location coordinates on the Itempost page?
« Reply #7 on: August 16, 2022, 11:16:58 AM »
Code is correct, do not see reason why it would not work.

The error may be here

Code: [Select]
if(!$edit) {
$prepare['d_coord_lat'] = osc_item_latitude();
$prepare['d_coord_long'] = osc_item_longitude();
  } else {
        $prepare['d_coord_lat'] = eps_get_session('dcoordlat') <> '' ? eps_get_session('dcoordlat') : osc_item_latitude();
$prepare['d_coord_long'] = eps_get_session('dcoordlong') <> '' ? eps_get_session('dcoordlong') : osc_item_longitude();
  }

I made several attempts
But it didn't work

*

MB Themes

Re: How to manually enter the location coordinates on the Itempost page?
« Reply #8 on: August 16, 2022, 11:26:07 AM »
@rooman
Not sure if you need to mix this with sessions, it will overcomplicate.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

rooman

  • ****
  • 223 posts
Re: How to manually enter the location coordinates on the Itempost page?
« Reply #9 on: August 16, 2022, 12:59:06 PM »
Thank you
Yes correct
The problem is that when you add latitude and longitude, no
It is stored with the same input, but the data is changed to
other numbers
I don't know what's causing the problem, maybe the maps plugin is the cause
If you disable it, the data will be entered correctly
When you activate it, the problem occurs