Forum

[SOLVED] How to get...
 
Notifications
Clear all

[SOLVED] How to get item location url?

7 Posts
3 Users
0 Likes
380 Views
(@oscman)
Posts: 12
Active Member
Topic starter
 

I want to print the location of the item a user is browsing now, is there any function for this?

 
Posted : 05/04/2020 7:23 pm
(@rusnam)
Posts: 219
Estimable Member
 

<?php echo osc_item_url(); ?>

 
Posted : 10/04/2020 10:14 am
(@oscman)
Posts: 12
Active Member
Topic starter
 

<?php echo osc_item_url(); ?>

That would only return the item url, i would need something like <?php echo osc_item_location_url(); ?>

 
Posted : 10/04/2020 10:25 am
Defected
(@dftd)
Posts: 614
Honorable Member Admin
 

What do you mean "item location url"? To get item location you can use osc_item_country(), osc_item_region(), osc_item_city() etc.

Available for custom Osclass development. www.defected.dev

 
Posted : 10/04/2020 1:58 pm
(@oscman)
Posts: 12
Active Member
Topic starter
 

Yes maybe i didn't express myself correctly, i mean the location search url, ie city of the item is London, i want to make it clickable and when a user clicks on it will go to the search page of this city. Something like
http://localhost/search/sOrder,dt_pub_date/iOrderType,desc/country,GB/region,1/city,1

 
Posted : 11/04/2020 11:58 am
Defected
(@dftd)
Posts: 614
Honorable Member Admin
 

Ok, that makes more sense. Try this.


<?php echo osc_search_url(array('sCountry'=> osc_item_country_code(), 'sRegion' => osc_item_region_id(), 'sCity' => osc_item_city_id())); ?>

Available for custom Osclass development. www.defected.dev

 
Posted : 11/04/2020 1:20 pm
(@oscman)
Posts: 12
Active Member
Topic starter
 

Ok, that makes more sense. Try this.


<?php echo osc_search_url(array('sCountry'=> osc_item_country_code(), 'sRegion' => osc_item_region_id(), 'sCity' => osc_item_city_id())); ?>

Thank you, that's exactly what i needed

 
Posted : 11/04/2020 2:21 pm
Share: