Purchase OIOpublisher now for just $47.

Take control of your ad space.

Click here to purchase

  1.  

    Hi,

    it is possible to define subID's in purchase.php form? I can set subID's in edit-mode of a banner ad. but can I define a subID on purchase page?

    There is a setting to use the wordpress categories but I can't find the setting for subID's.

    Thanks for help!

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorSimon
    • CommentTimeApr 3rd 2016
     
    Project Admin

    Hmmm it should be possible (in the admin view) to add a subID from the purchase creation screen. I've just tested it to check and it is visible just below the category.

    Are using using the latest version - 2.60?

    Need help?  Quick start guide | Troubleshooting | All help topics
  2.  

    hi,

    yes I am using 2.60. In admin view it is possible to set subID. But is it possible to set a subID in purchase form if I am not a admin?

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorSimon
    • CommentTimeApr 17th 2016
     
    Project Admin

    If you set the subid parameter in the ad zone code (used to display that zone on your site), then it will carry through to the purchase form automatically.

    For example:

    <?php
    if(function_exists('oiopub_banner_zone')) {
    oiopub_banner_zone(1, array(
    'align' => 'center',
    'subid' => 'subid-value-goes-here',
    ));
    }
    ?>

    Need help?  Quick start guide | Troubleshooting | All help topics
  3.  

    ok. but what if I want to set the subID during purchase based on a list containing values.

    For example:

    <select name="subID">
    <option>subID-1</option>
    <option>subID-2</option>
    <option>subID-3</option>
    <option>subID-4</option>
    <option>subID-5</option>
    </select>

    meaning, I want to set the subID during the process of purchase and not before.

    thank you :-)

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorSimon
    • CommentTimeApr 24th 2016
     
    Project Admin

    You can add a new field to the purchase form, as you described above, by adding it to the relevant template. For example, for banner ads it would be OIO's "/templates/core/purchase_banners.tpl" file.

    <select name="subid">
    <option value="subid-value-1">Sub Id 1</option>
    <option value="subid-value-2">Sub Id 2</option>
    <option value="subid-value-3">Sub Id 3</option>
    </select>

    The only other slight tweak required would be in OIO's "include/functions.php" file, to make sure the subid can be picked up from a POST request (by default it only looks at a GET request).

    In that file, find:

    if($sub_id = oiopub_var('subid', 'get')) {

    And change it to:

    if($sub_id = oiopub_var('subid', 'request')) {

    Need help?  Quick start guide | Troubleshooting | All help topics
  4.  

    Thank you very much!!!
    Works great! :-)

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorSimon
    • CommentTimeMay 1st 2016
     
    Project Admin

    No problem, glad it did the trick.

    Need help?  Quick start guide | Troubleshooting | All help topics