Advertisement:

Author Topic: [TUTO] Check publisher profile info and show it in ads  (Read 683 times)

volunteer

  • Full Member
  • ***
  • Posts: 241
[TUTO] Check publisher profile info and show it in ads
« on: November 06, 2015, 03:19:22 pm »
Thanks to TESEO for this code  :)

This code is to check if some of the fields of a publisher's profile has certain info, and post the result in the ads (item.php) created by the same publisher.

For example, if publisher Mr. XXX has completed his address information, ads posted by Mr. XXX will say "address info complete" or whatever else you want.

So, in our item.php work with this code:

Code: [Select]

<?php $user_data User::newInstance()->findByPrimaryKey(osc_item_user_id());
if (
$user_data['FIELD YOU WANT TO CHECK']) { ?>

////////////////// ////////////////// ////////////////// ////////////////// ////////////////// //////////////////
////////////////// //////////////////     WRITE MSG OF HTML CODE HERE               //////////////////
////////////////// ////////////////// ////////////////// ////////////////// ////////////////// //////////////////
<?php ?>


This are the fields you can use:

Code: [Select]
    's_country',
    's_region',
    's_city',
    's_city_area',
    's_address',
    's_zip',
    's_website',
    's_phone_land',
    's_phone_mobile'
« Last Edit: November 06, 2015, 03:22:20 pm by volunteer »