All Page Functions
  • 29 Dec 2023
  • 1 Minute to read

    All Page Functions


      Article Summary

      You can call these predefined functions where applicable when creating a custom campaign, rule or goal.

      Getting the total amount of the cart/basket

      The following function returns the total amount of the cart/basket.

      Function CallReturns
      Insider.systemRules.call('getTotalCartAmount')Float
      Insider.systemRules.call('getTotalCartAmount')

      For example, the below response returns the total amount of the cart/basket.

      Getting the language

      The following function returns the current language of your website.

      Function CallReturns
      Insider.systemRules.call('getLang')String
      Insider.systemRules.call('getLang')

      For example, the below response returns the language of your website.

      Detecting the homepage

      The following function detects if the current page is the homepage.

      Function CallReturns
      Insider.systemRules.call('isOnMainPage')Boolean

      For example, the below response returns if the current page is the homepage.

      Getting the searched keywords

      The following function returns the searched keywords.

      Function CallReturns
      Insider.systemRules.call('getSearchKeyWords')String
      Insider.systemRules.call('getSearchKeyWords')

      For example, the below response returns the searched keywords on your website.

      Getting the cart/basket count

      The following function returns the number of the products in the cart/basket.

      Function CallReturns
      Insider.systemRules.call('getCartCount')Number
      Insider.systemRules.call('getCartCount')

      For example, the below response returns the number of the products in the cart/basket.

      Getting the currency

      The following function returns the currency of the price(s) on any page of your website.

      Your title goes here
      If you have multiple currencies on your website, the respective currency will return when the products are displayed with that currency. This functions returns the existing currency on the page.
      Function CallReturns
      Insider.systemRules.call('getCurrency')String
      Insider.systemRules.call('getCurrency')

      For example, the below response returns the currency of the price(s) of your website.

      Getting the login information of the user

      The following function returns the information whether the current user logged in.

      Function CallReturns
      Insider.systemRules.call('isUserLoggedIn')Boolean
      Insider.systemRules.call('isUserLoggedIn')

      For example, the below response returns false since the current user did not log in to your website. Otherwise, it returns true.

      Getting the registration information of the user

      The following function returns the information whether the current user registered successfully.

      Function CallReturns
      Insider.systemRules.call('isOnRegSuccessPage')Boolean
      Insider.systemRules.call('isOnRegSuccessPage')

      For example, the below response returns false since the current user did not register to your website successfully. Otherwise, it returns true.

      Detecting the coupon page

      The following function detects whether the current page is the coupon page.

      Function CallReturns
      Insider.systemRules.call('isOnCouponPage')Boolean
      Insider.systemRules.call('isOnCouponPage')

      For example, the below response returns false since the current page is not the coupon page. Otherwise, it returns true.

      Getting the coupon button usage

      This function returns the coupon inputs.

      Function CallReturns
      Insider.systemRules.call('useCouponButton')Object
      Insider.systemRules.call('useCouponButton')

      For example, the below response returns the coupon button usage details.

      Getting the coupon application information

      The following function returns the information whether the coupon is applied.

      Function CallReturns
      Insider.systemRules.call('isCouponCodeApplied')Boolean
      Insider.systemRules.call('isCouponCodeApplied')

      For example, the below response returns true since the coupon code is applied. Otherwise, it returns false.



      Was this article helpful?

      ESC

      Eddy, a super-smart generative AI, opening up ways to have tailored queries and responses