Advertisement:

Author Topic: Help with Activate-Deactivate Item plugin i bought  (Read 331 times)

joecoolll

  • Jr. Member
  • **
  • Posts: 86
Help with Activate-Deactivate Item plugin i bought
« on: September 02, 2018, 02:33:15 am »
hi ... could i get some help setting this up on the shopclass theme please ?


I don't see anything in search and i can't find the plugin author.



In the plugin help they say this ..




""" Activate-Deactivate Item Plugin Code
This is a generic code which will show a plain <a href> links inside your theme's USER DASHBOARD or ITEM PAGE. You have to replace string 'theme' with your's theme translation string name (e.g. 'bender', 'modern', 'paris').

<?php if(osc_item_is_enabled() && osc_item_is_active()) { ?>
    <a href="<?php echo osc_route_url('route-user-item-deactivate', array('itemId' => osc_item_id())); ?>"><?php _e('Deactivate', 'theme'); ?></a>
<?php } elseif(osc_item_is_enabled() && osc_item_is_inactive()) { ?>
    <a href="<?php echo osc_route_url('route-user-item-activate', array('itemId' => osc_item_id())); ?>"><?php _e('Activate', 'theme'); ?></a>
<?php } ?>
IMPORTANT NOTES:

1. When implementing the above code inside user dashboard / user items page(s), you must be careful to put it inside items loop code, so that each item has a proper set of Activate-Deactivate links.

2. If you wish, you can also place Activate-Deactivate links directly on ITEM page, next or below factory built-in EDIT link (for example, this is the most logical place), but be careful to place it inside if condition check if user is logged-in and if item user ID is equal to logged-in user ID (if item belongs to the logged-in user). Of course, if you make a mistake nothing wrong would happen (plugin protection system will reject guests, visitors/viewers and non-owners), but it will be strange to have those links shown if item does not belong to the logged-in author. Usually, you will simply have to open item.php page and place the code below <a href> edit link. Please note that below instructions do not include ITEM page implementation (only USER DASHBOARD / USER ITEMS).  """"




how do i make this code for shopclass theme please ?







thank you.