1. panda

    panda - Mar 26, 2014 Member

    Credit
    Point
    Hi Team,
    Can you put a "Purchased" tag after user move the mouse to a purchased resource.
    Now, if user moves his mouse to an unpurchase item, there will be a "Purchase" button appeared. If user moves his mouse to a purchased item, nothing happened.
    can you change it to "Purchased" for purchased item?
    Screen Shot 2014-03-26 at 30233 PM
     
    Loading...
  2. Brivium

    Brivium - Mar 26, 2014 XenForo Services Staff Member

    Credit
    Point
    You can change all content on template BRCRI_resource_price to following code
    Code:
    <xen:require css="BRCRI_resource_price.css" />
    <xen:if is="{$resource.credit_price}>0 && !{$resource.is_fileless}">
        <a href="{xen:link resources/download, $resource, 'version={$resource.current_version_id}'}" class="credit_price">{xen:helper brc_currencyformat, {$resource.credit_price},true,{$resource.brcri_currency_id}}</a>
        <xen:if is="!{$resource.is_purchased}">
        <xen:if is="{$visitor.user_id}!={$resource.user_id}  && !{$hidePurchase}">
        <a href="{xen:link resources/download, $resource, 'version={$resource.current_version_id}'}" title="{xen:phrase purchase}" class="button buy_button" data-cacheoverlay="no">{xen:phrase purchase}</a>
        </xen:if>
        <xen:else/>
        <a href="javascript:;" title="{xen:phrase purchase}" class="button buy_button" >Purchased</a>
        </xen:if>
    </xen:if>
     
    panda likes this.
    #2
  3. panda

    panda - Mar 26, 2014 Member

    Credit
    Point
    Excellent
    I created a new phrase "BRCRI_purchased" for this word "Purchased", and replace it in your code, works fine.
    Thank you!
     
    #3
  4. DJ XtAzY

    DJ XtAzY - Mar 27, 2014 New Member

    Credit
    Point
    Can this be implemented for the store too?
     
    #4
  5. Brivium

    Brivium - Mar 28, 2014 XenForo Services Staff Member

    Credit
    Point
    You can open template BRS_product_list_item and find
    Code:
    <xen:if is="{$canPurchase} && {$product.quantity} && (!{$product.is_purchased} || {$product.length_unit})">
                        <xen:if is="{$product.length_unit} AND {$product.recurring}">
                            <a href="{xen:link brs-products/purchase , $product}" title="{xen:phrase subscribe}" class="button buy_button OverlayTrigger" data-cacheoverlay="no">{xen:phrase subscribe}</a>
                        <xen:else />
                            <a href="{xen:link brs-products/purchase , $product}" title="{xen:phrase purchase}" class="button buy_button OverlayTrigger" data-cacheoverlay="no">{xen:phrase purchase}</a>
                        </xen:if>
                    </xen:if>
    Replace with
    Code:
    <xen:if is="!{$product.is_purchased}">
                    <xen:if is="{$canPurchase} && {$product.quantity} && (!{$product.is_purchased} || {$product.length_unit})">
                        <xen:if is="{$product.length_unit} AND {$product.recurring}">
                            <a href="{xen:link brs-products/purchase , $product}" title="{xen:phrase subscribe}" class="button buy_button OverlayTrigger" data-cacheoverlay="no">{xen:phrase subscribe}</a>
                        <xen:else />
                            <a href="{xen:link brs-products/purchase , $product}" title="{xen:phrase purchase}" class="button buy_button OverlayTrigger" data-cacheoverlay="no">{xen:phrase purchase}</a>
                        </xen:if>
                    </xen:if>
                    <xen:else/>
                    <a href="javascript:;" title="{xen:phrase purchased}" class="button buy_button">{xen:phrase purchased}</a>
                    </xen:if>
    Regards,
     
    #5