Skip to content
View in the app

A better way to browse. Learn more.

Clicshopping AI, Free generative artificial intelligence e-commerce Open Source , Open Source Store Onlne

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to use Hooks with APP in administration ?

Featured Replies

ClicShopping 3.X allow you to use use hooks inside your App to increase the functionalities in others App.


To use this element you can have different choice depends with the app than you want to use

 

Use the Hooks
In hooks you have 2 choices :

output to display an information
call to use a function.

 $CLICSHOPPING_Hooks->call('Orders','Update');
 $CLICSHOPPING_Hooks->ouput('Orders','ContentTracking', null 'display);

To use the hook with call you can have different choices depending of the Hooks : The best is to look this directory inside the original hook where you want to include anew functionalities :

ClicShopping/Apps/Products/ExtraFields/Modules/Hooks/ClicShoppingAdmin/ExtraFields
 $CLICSHOPPING_Hooks->call('Products','Insert');
 $CLICSHOPPING_Hooks->call('Products','Update');
 $CLICSHOPPING_Hooks->call('Products','Delete');
 $CLICSHOPPING_Hooks->call('Products','Save');

At end, don't forget to insert in the

clicshopping.json

the new hook

Display a Hooks
About to display a hooks inside the page you can you something like that
<div id="ContentTabQuantityDiscount"> in the original files you want to modify

inside the hooks you can use this element to display the information. it could a new tab or inside a tab a content.

For a Tab


$dejardins_button = HTML::button('button_name');
$content = '<div> Desjardi</div>;

        $output = <<<EOD
<div class="tab-pane" id="section_CMCICApp_content">
  <div class="mainTitle"></div>
  <div class="adminformTitle">
  <div class="separator"></div>
    {$dejardins_button}
    {$content}
  </div>
</div>

<script>
$('#section_CMCICApp_content').appendTo('#orderTabs .tab-content');
$('#orderTabs .nav-tabs').append('    <li class="nav-item"><a data-target="#section_CMCICApp_content" role="tab" data-toggle="tab" class="nav-link">{$tab_title}</a></li>');
</script>
EOD;

For a content

 you can use append or prepend

$content = '<div>mycontent</div>';

    $output = <<<EOD
<!-- ######################## -->
<!--  Start SpecialsApp      -->
<!-- ######################## -->
<script>
$('#tab9Content').prepend(
    '{$content}'
);
</script>
<!-- ######################## -->
<!--  End SpecialsApp      -->
<!-- ######################## -->
EOD;

For more informations, see the Hooks documentation

Guest
This topic is now closed to further replies.

Important Information

By using this site, you agree to our Terms of Use

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.