Bug No Renew Button

Status
Not open for further replies.

au lait

Customer
The users ask me how they can renew a license!

In the template I found this


Code:
    <xf:if is="$license.Product.canPurchase($license)">
        <xf:button href="{{ $isValid ? link('dbtech-ecommerce/purchase', $license.Product, {'license_key': $license.license_key}) : '' }}" class="{{ $isValid ? '' : 'is-disabled' }}" icon="purchase" overlay="true" data-cache="false">
            {{ phrase('dbtech_ecommerce_renew_license') }}
        </xf:button>
    </xf:if>


Screen_20181001111920.webp

But is not displayed - why not?
 
But is not displayed - why not?
There's a number of reasons why the canPurchase check would return false:
  • The current user is the product owner
  • The product's state is not "visible" (soft deleted or moderated)
  • The current user does not have permission to purchase the product (global user group permissions / per-product permissions / per-category permissions)
  • If a license parameter is provided
    • The license is "lifetime" (no expiry date)
    • The license owner is not the current user (e.g. you, as a moderator, is viewing someone else's licenses)
By "Current user" I mean \XF::visitor().
 
The current user is the product owner
no
"au lait" ist the owner - logged in user is "TestUser"
Screen_20181001043351.webp


The product's state is not "visible" (soft deleted or moderated)
no
user can see product and can purchase
Screen_20181001043351.webp

The current user does not have permission to purchase the product (global user group permissions / per-product permissions / per-category permissions)
no "purchase button exists
Screen_20181001043351.webp

If a license parameter is provided
  • The license is "lifetime" (no expiry date)
  • The license owner is not the current user (e.g. you, as a moderator, is viewing someone else's licenses)
no - which would have been seen in the first post!
Screen_20181001043231.webp


You are welcome to take a look yourself.
URL: https://xenmade.com/
User: TestUser
PW: TestUser
 

Attachments

  • Screen_20181001043238.webp
    Screen_20181001043238.webp
    16.8 KB · Views: 0
Have you actually tested this by manually changing the various return false; statements to return true; in /src/addons/DBTech/eCommerce/Entity/Product.php or are you just going by the screenshots you're posting?

Because this bit:
The license owner is not the current user (e.g. you, as a moderator, is viewing someone else's licenses)
Is where your screenshots seem to break down.

no - which would have been seen in the first post!
You only highlighted the expiry date, you did not tell me whether you are viewing someone else's licenses. For instance, if I go to your license list and click your eCommerce license, I cannot renew it:

1538404993602.webp

Because you own the license and I am viewing the license, I am not logged in to your account.

In other words, if you are seeing this report from your users and you are accessing their licenses via the "View licenses" button, then your explanation fails on the "the license owner is not the current user" point.

Please clarify.
 
Hello @au lait,

We hope your ticket regarding DragonByte eCommerce has been addressed to your satisfaction. This ticket has now been closed.

If your ticket has not been resolved, you can reply to this thread at any point in the next 7 days in order to reopen the ticket, afterwards this thread will be closed.

Please do not reply to this thread if your ticket has been resolved.

Thank you.


- DragonByte Technologies, Ltd.
 
Status
Not open for further replies.

DragonByte eCommerce

XenForo 2.0.6+ XenForo 2.1.x XenForo 2.2.x XenForo 2.3.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
3,045
Customer rating
4.86 star(s) 7 ratings
Back
Top