+ Reply to Thread
Page 4 of 7 FirstFirst ... 23456 ... LastLast
Results 31 to 40 of 68

Thread: Problem with free package

  1. #31
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,174
    Actually, when you set, for example, 5 for 'Limit use of listing package' it means that user can use this package 5 times
    and after the last added listing it will show 'Used Up'

  2. #32
    Senior Member
    Join Date
    Jun 2016
    Location
    New York
    Posts
    158
    Quote Originally Posted by Wei Hong View Post
    this error happen with paid plan as well? Or just free plan?
    Hello Wei,

    I tested only the free plan, I do not know if it happens on the paid plan.

    Thankyou.
    Last edited by Ed; March 29, 2018 at 09:54 AM.

  3. #33
    Senior Member
    Join Date
    Jun 2016
    Location
    New York
    Posts
    158

    Unhappy Problem with free package (Usage Limit)

    Quote Originally Posted by Rudi View Post
    Actually, when you set, for example, 5 for 'Limit use of listing package' it means that user can use this package 5 times
    and after the last added listing it will show 'Used Up'
    Hello Rudi,

    But the system is displaying a message that a hack has been detected.

    In addition the "Plan Usage Stats" is displaying several records, that is, all repeated, is as Autocy reported above.
    screen-2.jpg

    If I limit to 5, the system will allow 6 or 7 times.

    It is a pity... because I tested version 4.5.2 here on my computer and there is no such error.

    Thank you
    Last edited by Ed; March 29, 2018 at 06:55 PM.

  4. #34
    Senior Member
    Join Date
    Jun 2016
    Location
    New York
    Posts
    158

    Question Problem with free package (Usage Limit)

    Hello Rudi,

    The error is now occurring in reverse.

    1 - I added a free plan, name: (Free)
    2 - Set a usage limit in 5 (Five)
    See the illustrative image below:
    screen-1.jpg

    3 - I entered the system as a Dealer, even with a limit of 5 (Five), I was able to use the 10 (Ten) times plan, and in addition there was a serious error in the "Plan Usage Stats".
    See the illustrative image below:
    screen-2.jpg

    Thank You !
    Last edited by Ed; March 29, 2018 at 06:55 PM.

  5. #35
    Senior Member
    Join Date
    Dec 2012
    Posts
    102
    it works correctly up to 2 limited plan uses...
    and Upgrade/renew listing plan works ok! it updates the balance correctly without adding a new entry in plan using database
    Last edited by autocy; March 29, 2018 at 02:24 PM.

  6. #36
    Senior Member
    Join Date
    Jun 2016
    Location
    New York
    Posts
    158

    Unhappy Problem with free package (Usage Limit)

    Hello Autocy,

    I am waiting for a return of a ticket that I opened...

    Thank you for your attention!
    Last edited by Ed; March 30, 2018 at 01:05 PM.

  7. #37
    Senior Member
    Join Date
    Dec 2012
    Posts
    102
    i've found the problem:
    under the new class file addlisting.php (~line 1283)flynax never inserted code for updating plan using:

    // Limited listing mode
    elseif ($plan_info['Type'] == 'listing' && $plan_info['Limit'] > 0 ) {


    $usage_key = $plan_info['Using'] ? 'Using' : 'Limit';
    $plan_usage_insert = array(
    'Account_ID' => $account_info['ID'],
    'Plan_ID' => $plan_info['ID'],
    'Listings_remains' => $plan_info[$usage_key] - 1,
    'Type' => 'limited',
    'Date' => 'NOW()',
    'IP' => $reefless->getClientIpAddress()
    );


    $rlDb->insert($plan_usage_insert, 'listing_packages');
    }



    i have added/changed code:

    // Limited listing mode
    if ($plan_info['Type'] == 'listing' && $plan_info['Limit'] > 0)
    {
    if ($plan_info['Using'] == '') {
    $usage_key = $plan_info['Using'] ? 'Using' : 'Limit';
    $plan_usage_insert = array(
    'Account_ID' => $account_info['ID'],
    'Plan_ID' => $plan_info['ID'],
    'Listings_remains' => $plan_info[$usage_key] - 1,
    'Type' => 'limited',
    'Date' => 'NOW()',
    'IP' => $reefless->getClientIpAddress()
    );


    $rlDb->insert($plan_usage_insert, 'listing_packages');
    }

    else
    {
    $plan_using_update = array(
    'fields' => array(
    'Account_ID' => $account_info['ID'],
    'Plan_ID' => $plan_info['ID'],
    'Listings_remains' => $plan_info['Using']-1,
    'Type' => 'limited',
    'Date' => 'NOW()',
    'IP' => $reefless->getClientIpAddress()
    ),
    'where' => array(
    'ID' => $plan_info['Plan_using_ID']
    )
    );
    $rlDb->update($plan_using_update, 'listing_packages');


    }

    }


    Rudi confirm please if code ok!
    now works fine from my site!
    Last edited by autocy; March 29, 2018 at 06:21 PM.

  8. #38
    Senior Member
    Join Date
    Sep 2017
    Posts
    155
    Hello Guys, is this a script wide issue as i have not created my plans yet and will the Flynax team be providing the correct fix? Thanks

  9. #39
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,174
    Hello everyone,

    I've reviewed the code and unfortunately, there are a lot of things to do to
    this feature practically doesn't work and requires full review and update

    it will be fixed in the next update, so please be patient

    Sorry for the inconveniences!

  10. #40
    Senior Member
    Join Date
    Dec 2012
    Posts
    102
    Rudi this is the code from upgrade listing controler which is working fine:
    // limited listing mode
    elseif ($plan_info['Type'] == 'listing' && $plan_info['Limit'] > 0 )
    {
    /* update/insert limited plan using entry */
    if ( empty($plan_info['Using']) )
    {
    $plan_using_insert = array(
    'Account_ID' => $account_info['ID'],
    'Plan_ID' => $plan_info['ID'],
    'Listings_remains' => $plan_info['Limit']-1,
    'Type' => 'limited',
    'Date' => 'NOW()',
    'IP' => $reefless->getClientIpAddress()
    );

    $GLOBALS['rlActions'] -> insertOne($plan_using_insert, 'listing_packages');
    }
    else
    {
    $plan_using_update = array(
    'fields' => array(
    'Account_ID' => $account_info['ID'],
    'Plan_ID' => $plan_info['ID'],
    'Listings_remains' => $plan_info['Using']-1,
    'Type' => 'limited',
    'Date' => 'NOW()',
    'IP' => $reefless->getClientIpAddress()
    ),
    'where' => array(
    'ID' => $plan_info['Plan_using_ID']
    )
    );

    $GLOBALS['rlActions'] -> updateOne($plan_using_update, 'listing_packages');
    }

+ Reply to Thread