• Home
  • Demo
  • Buy Now
RISE - Ultimate Project Manager & CRM
    RISE - Ultimate Project Manager & CRMInstallation & MaintenancePersonalizationSettingsClient ManagementAI AssistantInvoices & PaymentsProjects & TasksTeam & CollaborationProductivity ToolsSales & ServicesRISE ReportsPluginsFAQChange logs
Mailbox PluginLanding Page Builder PluginEasy Backup PluginSquare Payment Method PluginLogin as Client PluginAsset Management Plugin2 Factor Authentication PluginPassword Manager PluginSocial Login PluginGoogle Meet Integration PluginSpreadsheets PluginZoom Integration PluginAuto Attendance PluginWhiteboards PluginDocs PluginBlog Manager PluginWhatsApp Link PluginMicrosoft Teams Integration PluginProperty Management PluginTelegram Notification PluginAWS S3 Integration PluginWhatsApp Notification PluginWasabi Integration PluginBackblaze Integration PluginCloudflare R2 Integration PluginDigitalOcean Spaces Integration PluginAdyen Payment Method PluginbKash Payment Method Pluginiyzico Payment Method PluginJazzCash Payment Method PluginMercado Pago Payment Method PluginMidtrans Payment Method PluginMontonio Payment Method PluginN-Genius Payment Method PluginNagad Payment Method PluginPayFast Payment Method PluginPaysera Payment Method PluginPaystack Payment Method PluginPix Payment Method PluginRazorpay Payment Method PluginRocket Payment Method PluginSSLCommerz Payment Method Plugin
  1. Docs
  2. RISE - Ultimate Project Manager & CRM
  3. Plugins

Add buttons to store items from a plugin

Your plugin can show extra buttons under the Buy now or Add to cart button of a store item. For example: Live preview, Docs or Support. Each item can have its own links, or no buttons at all.

The buttons show on the item details page and in the item details modal.

Step 1: Save the links with the item

Add a field for each link to the item form. Name the fields plugin_data[your_plugin][key]. RISE saves them with the item. See the article "Add your own data to store items from a plugin - Item fields, buyer inputs and order item values" for more details.

app_hooks()->add_action('app_hook_item_modal_form_store_options', function ($item_info) {
    $links = \App\Libraries\Store_manager::get_plugin_data($item_info, "demo_links");
    $fields = array("preview_url" => "Live preview URL", "docs_url" => "Docs URL", "support_url" => "Support URL");

    foreach ($fields as $key => $label) {
        echo '
'; echo ''; echo '
<input type="text" name="plugin_data[demo_links][' . $key . ']" value="' . esc(get_array_value($links, $key)) . '" class="form-control" />
'; echo '
'; } });

Step 2: Show the buttons

Use the app_filter_store_item_details_buttons filter. Add one array for each button and return the list.

app_hooks()->add_filter('app_filter_store_item_details_buttons', function ($buttons, $args) {
    $links = get_array_value($args["plugin_data"], "demo_links");
    if (!$links) {
        return $buttons;
    }

    if (get_array_value($links, "preview_url")) {
        $buttons[] = array("title" => "Live preview", "url" => $links["preview_url"], "icon" => "eye", "sort" => 10);
    }

    if (get_array_value($links, "docs_url")) {
        $buttons[] = array("title" => "Docs", "url" => $links["docs_url"], "icon" => "book-open", "sort" => 20);
    }

    if (get_array_value($links, "support_url")) {
        $buttons[] = array("title" => "Support", "url" => $links["support_url"], "icon" => "life-buoy", "full_width" => true, "sort" => 30);
    }

    return $buttons;
}, 10, 2);

The second value ($args) has:

KeyValue
item_idThe ID of the item.
item_infoThe item.
plugin_dataThe plugin data of the item, grouped by plugin name.
contextpage (item details page) or modal (item details modal).

Button options

OptionWhat it does
titleRequired. The button text. HTML is removed.
urlRequired. It must start with http://, https://, mailto: or tel:. A link that starts with / opens a page of this app, for example /store.
iconOptional. A feather icon name, for example eye, book-open, life-buoy.
new_tabOptional. true or false. Links to other sites open in a new tab by default.
styleOptional. default, primary, info, success, warning, danger or dark. For a light colored button use soft-blue, soft-indigo, soft-sky, soft-teal, soft-coral, soft-orange, soft-amber, soft-violet or soft-slate. The default is default.
full_widthOptional. On the details page, buttons show two in a row. Set true to give a button its own row.
sortOptional. A number. Lower numbers show first. The default is 100.
show_mediaOptional. Set true to open the item images and videos in a full screen viewer, like the file preview. Uploaded videos and video links (YouTube, Vimeo, Loom, Dailymotion) play in the viewer. You don't need a url. If the item has no images or videos, the button is not shown.

A button with a missing title or a wrong URL is not shown.

Show a Screenshots button

For example, show a Screenshots button when the item has no live preview link:

if (!get_array_value($links, "preview_url")) {
    $buttons[] = array("title" => "Screenshots", "show_media" => true, "icon" => "image", "sort" => 10);
}

The images and videos show in the same order as on the item page. Users can move to the next or previous one with the arrows, and close the viewer with the Esc key. A video stops when the user moves to another one.

Show your own HTML

To show something else under the buttons, use the app_hook_store_item_details_buy_panel_extension action. It gets an array with item_info and context.

app_hooks()->add_action('app_hook_store_item_details_buy_panel_extension', function ($args) {
    echo '

Free updates for 1 year.

'; });

Escape every value you print with esc().

Was this article helpful? Yes No
How can we improve this article?
© 2026 Fairsketch
Home Get Support Buy Now

Delete?

Are you sure? You won't be able to undo this action!
To do