Documentation
vAlexa

## Installation

### 1. Requirements

- PHP version 7.3 or greater
- PHP Curl extension
- PHP FileInfo extension
- PHP JSON extension
- PHP Intl extension
- PHP MbString extension
- PHP OpenSSL extension
- PHP Pdo_mysql extension
- Mysql version 5.6 or greater

### 2. Installation

The .zip file contains two folders, one named "Doc" contains the documentation and one name "Script" contains the main script of the application.

- The documentation serves as a reference to configure your website and know how things work.

- The main Script folder is the application.

- Extract the zip file.
- Move the content of "Script" folder to your domain name folder.
Note: The .htaccess file you see in the list of files contains the necessary directives to redirects all requests to /public folder.
A better solution to redirect requests to public folder is to change the "Document root" from your cPanel >> Domains or Subdomains.
With a Primary domain (the main domain name in your server), it may not be possible to change to Document root, so, the .htaccess file above will take care of the redirection.
- To start the installation, access your website via the address bar, https://example.com , you will be redirected automatically to the installation form.
Note: Some fields of the installation form will be stored in .env file (Database info, website url) while the rest will be stored in your database.
- Once the installation is completed, you will be redirected to the website administration, there, you can start configuring your website (Mailer, Payment gateways, Files hosts, ...).

### 3. General

General settings, site name, title, description, logo, favicon...

### 4. Database

Here, you should already have a database created in your server, in order to do that (if it's not already done), in yout server cPanel, click on "MySQL® Databases"

then create a new database
then create a new user for your database
and finally add the user you've just created to your database

Note: the user's username & password and the database's name are what you need to configure your database

The database's Host is usually "127.0.0.1" or "localhost", if it doesn't work, which is rare, you need to contact you hosting provider.

### 5. Admin access

The user administrator of your website

Note: the avatar is not required during the installation, you can upload one from the website's admin area.

## Settings

### General

- Name : Your website's name
- Title : A headline for your website
- Description : A short description for your website
- Email: Your email address (optional)
- Keywords : Some keywords for your website
- Items per page : The number of products/items to show per page on the client interface (not the administration).
- Environnemnent : The environment's mode (production or development)
- Debug : Whether to show eventual error messages or not.
- Blog Title : A title for the blog section.
- Enable subscriptions : Enable / Disable Pricing.
- Blog Description : A description for the blog section.
- Search Panel headers : Headlines to show above the home's main search bar
- Timezone : The local time to use for your application.
- Social Links : Links to your social media accounts/pages (facebook, pinterest, vk, ...).
- Favicon | Logo | Website Cover | Top Cover | Blog Cover | Watermark
- Top Cover : A home-page search panel cover, one for each template.
- Watermark : An optional watermark to apply on products covers.
- Fonts : Specify custom fonts to use for your website front-office (visitors/buyers side). You can use fonts from google-fonts or from your server.
  - - From google fonts : Enter the font URL
  - - From your server : Upload fonts (files/folders) to "/publi/assets/fonts/(FONT_FOLDER)/FILE_NAME'
  Example for local fonts :

  @font-face { font-family: 'Spartan'; src: url("/assets/fonts/Spartan/Spartan-Regular.ttf"); font-weight: 400; font-style: normal; }
  @font-face { font-family: 'Spartan'; src: url("/assets/fonts/Spartan/Spartan-Medium.ttf"); font-weight: 500; font-style: normal; }

- Template : Enable default template for your website.
- Notification for users : A text message to show on the home page for users to inform them about something.

### Mail

The mailer is required to send and receive email messages, for support, orders ... etc.

- In your server's cPanel, search/click on "Email Accounts"
- Then click on "Connect Devices" for your default email account or create a new one
- Then, at the bottom, you have two choices, secure and none-secure configuration (settings), the password is the one you used to create the new email account or the cPanel one if it's the default email account.

- Reply to : an email address to which the reply messages are sent when users want to reply to your email messages.
- Forward to : an email address to which recevied email messages will be forwarded to.
- Queue email messages : Enable/Disable queuing email messages to avoid delayed responses from the server. Email messages will be cached and then sent later with a script runing on a cron job.
- You can create a cron job from your server "cPanel" >> "Cron jobs".
- Example of a cron job command : /usr/local/bin/php /absolute_path_to_your_domain_name_folder/artisan queuedMails:send >> /dev/null 2>&1

### Payments

#### PayPal settings

- Create a PayPal business account
- Login to PayPal Developer Dashboard Here
- In "My Apps & Credentials" click on "Create App"
- Give your application a name, select a sandbox account and then click on "Create App"
- Once back to the previous page, click on the name of the app you've just created
- The default mode is "Sandbox" (testing mode), it has its Client ID and Secret ID (Click on "Show" to see it), if you want to use "Live" mode (real payments, no testing) switch to it and you will be shown the IDs for Live mode.

#### Change paypal store name

- login to your real paypal account (or sandbox)
- Click on Cog icon (beside logout button) and select "Account Settings"
- on the left menu, click on "Business information"
- For "Business information" click on "Update"
- At the right side of your store's logo, click on "Edit"
- In "Business name", click "Change"
- For "Let us know why you're changing your name" select "Your business name has changed"
- Enter your new business (store) name and validate the changes (click on "Update business name")
- That's it. This name is visible for users/buyers on paypal payment page if they want to go back to your website "store" rather than completing the purchase.

#### FlutterWave settings

- Create a FlutterWave account [Signup] and login to your account
- You can get your Public key and Secret key from the left menu "Settings / API"
- Click on the Webhooks tab in the same page
- In the webhook "URL" field enter : https://example.com/checkout/webhook (where example.com is your domain name)
- In the webhook "Secret hash" field enter any random string of characters (like a pasword)
- Check the first two checkboxes ["Receive Webhook response in JSON format" and "Enable Webhook retries"]
- Copy the "Secret hash" to your website / admin / settings / payments / flutterwave config with the public and secret key.
- You will need to add a bank account on the "Bank Accounts" tab to be able to process payment via bank transfer and other bank related methods other than cards especially on test mode.
- You can switch modes [Live/Test] from flutterwave admin dashboard / left menu.
- Test cards : https://developer.flutterwave.com/docs/test-cards

#### SslCommerz settings

- Create a sandbox SslCommerz account from Here
- You will receive your sanbox login credential via email
- Login to your sanbox account from Here
- You can use the sandbox account credentials to configure SslCommerz in your website, copy the Store id and the Store password to their corresponding field in your website / admin / settings / payments / sslcommerz
- Test cards : https://developer.sslcommerz.com/doc/v4/#payment-process-environment

#### Stripe settings

- Create a Stripe account
- Login to your Stripe account dashboard
- On the left menu, click on "Developers" and then "API Keys"
- You will have a "Publishable key" which is the Client ID in your website and a "Secret key" which is the Secret ID in your website.
  Those two keys or IDs are for testing only (paypal sandbox equivalent mode).
- Copy/paste those IDs in your website Stripe settings fields, enable stripe and save the changes (by clicking on the Update button).
- Note : In order to get Keys/IDs for non-testing mode (Live mode) you wil need to fill in the form Here and submit it to stripe for review.
- Test cards can be found Here

#### Change stripe store name and widget color|logo

- Login to your stripe account
- On the left menu, click on "settings", then, select "Account information"
- In "Public business information / Public business name" enter your new business (store) name
- You can edit the other fields too, 'support email', 'Statement descriptor', 'Business website' ...
- For wiget color and logo, back to the previous page and select "Branding" (Public business information / Branding)

#### Razorpay settings

- Create a Razorpay account
- Login to your Razorpay account dashboard
- On the left menu, click on "Settings" and then "API Keys"
- Copy the "Key Id" and "Key Secret" (you may need to click on "Generate Test key" blue button to get the necessary keys).
- Copy/paste those IDs in your website Razorpay settings fields, enable Razorpay and save the changes.
- Note : In order to get Keys/IDs for non-testing mode (Live mode) you wil need to fill in the form Here and submit it to Razorpay for review.
- Test cards can be found Here

#### Skrill settings

- Skrill payment gateway integration was done via Skrill_Quick_Checkout_Guide.pdf documentation, that is based on their way of working where users/developers are not allowed to access their business control panel for testing purposes (” Test Skrill accounts could be offered only to pre-approved merchants ”), so, you will need to contact them to get a Skrill merchant test account.
- Test merchant and test cards are in page 20 of Skrill_Quick_Checkout_Guide.pdf documentation.

#### Iyzico settings

- Create a sandbox Iyzico account Here
- Login to your sandbox Iyzico account dashboard
- On the left menu, click on "Settings" and then on "Merchant Settings"
- Click on "Show detail" for "API Key" and "Secret Key"
- Copy/paste those IDs in your website Iyzico settings fields ("API Key" to "Key ID" and "Secret Key" to "Key Secret"), enable Iyzico and save the changes.
- Note : In order to get Keys/IDs for non-testing mode (Live mode) you wil need to create a non-sandbox account Here, activate your account via the received email and follow the required steps for applying to a business account.
- Test cards can be found Here

#### CoinGate settings

- Create a sanbox CoinGate account Here
- Connect to your Coingate account.
- Create and App and get an Auth token following the instructions Here
- Copy/Paste your Auth token in your website >> Administration >> Settings >> Payments >> Coingate >> Auth Token
- Enter the currency (Code of 3 chars, e.g. USD) to which you want to exchange the received currency.
- To get an Auth token for live mode, create a non-sandbox account here Here, and follow the same previous steps. You may be prompted to provide more details about your activity.

#### Midtrans settings

- Create a Midtrans account Here
- Connect to your Midtrans sandbox account Here
- On the left menu click on "Settings" >> "Configuration".
- For "Finish Redirect URL*" enter https://example.com/checkout/save (where example.com is your domain name. Https ot Http depends on whether you have an ssl certificate or not.)
- For "Unfinish Redirect URL*" enter https://example.com/checkout
- For "Error Redirect URL*" enter https://example.com
- Save the changes.
- Get your Client Key, Server Key and Merchant ID from "Settings" >> "Access Keys"
- Copy/Paste them in your website >> Administration >> Settings >> Payments >> Midtrans
- You can edit your Midtrans payment form preferences form Settings >> Snap Preferences
- To switch to live mode, select "Production environment" in your Midtrans dashboard, and then follow the registration steps Here
- Test payments

#### Paystack settings

- Create a Paystack account Here
- Connect to your Paystack account
- On the left menu, click on "Settings" and then on "API Keys & Webhooks" tab. (no need to enter a 'Callback URL' and a 'Webhook URL')
- Copy/Paste your "Test Secret Key" and "Test Public Key" in your website >> Administration >> Settings >> Payments >> Paystack.
- Once done with testing, you can activate your account following the instrcutions in this page.
- Paytack Test payments.

#### Adyen settings

- Create a Adyen account Here
- Connect to your Adyen test account
- To generate API credentials, follow the instructions in this page
- Copy/Paste your "API key", "Client key" and "Merchant account" in your website >> Administration >> Settings >> Payments >> Adyen
- Test card numbers
- To activate live mode, connect to your Adyen test account and click on "Apply for live".

#### Instamojo settings

- Create a business Instamojo test account Here
- Connect to your Instamojo test account
- On the left menu click on "API & Plugins"
- Copy/Paste your "Private API Key", "Private Auth Token" and "Private Salt" in your website >> Administration >> Settings >> Payments >> Instamojo
- To switch to live mode, create a business Instamojo non-test account and proceed as before.

#### Offline payments settings

- Enter your bank account details

How it works

- The buyer completes his/her offline purchase
- His/her purchase is marked as pending
- He/she transfers the purchase amount to your bank account
- You validate the transfer in your bank account
- You mark the payment status as paid in your website >> Administration >> Transactions. If the transfer is not done, the buyer won't get access to the purchased items as long as you don't mark the payment or transactions as "Paid".

#### Fee

You can set a fee for each payment method independently. (Put 0 if not applicable)

#### VAT (Tax)

You can specify a VAT (Value Added Tax) to apply on your sales. (Put 0 if not applicable)

#### Main currency (Code & Symbol)

A currency code (ISO format) and a symbol if there is any (the "currency code" is mandatory).

#### Allow foreign currencies

Whether to accept receving payments in foreign currencies or not. This implies the use of a Currency exchange API if enabled.

#### Currencies

A selection of currencies in which users can see the prices of your products, and optionally, purchase with if "Allow foreign currencies" is enabled.

#### Currency exchange API

Select an API to use for the exchange rates.

You can specify an exchange rate manually for each currency based on the main one, in "config/payments.php", in currencies array, change null value for exchange_rate to your custom one and save the changes, this way the exchange rate will be obtained from config/payments.php file and not the API.

Note : "api.coingate.com", "api.exchangerate.host" and "api.exchangeratesapi.io" are free, while you must get an API key for "api.currencyscoop.com".

To get an API key for "api.currencyscoop.com", register to one of the pricing plans Here, you will find your API KEY in your account page.

#### Allow guest checkout

This allows users to purchase items without beeing connected, after they complete their purchases, they will be given an access token to gain access to the purchased items.

Allowing guest checkout, makes an option available in the footer of your website (your website's users/visitors/buyers interface), this option is called "Guest section", a page where users can enter a guest access token to get a list of purchased items.

²

### Files Hosts

#### Google Drive

- Login to Google Console API Here with your prefered gmail acccount
- Click on "Select a project" at the top left corner and select or create a new project in the popup window
- At the top, click on "ENABLE APIS AND SERVICES"
- Search for "Google Drive API", select it and then click on "ENABLE" (the blue button)
- On the left menu, click on "Credentials" and select "API Key" in "Create credentials" (the blue dropdown menu)
- Copy/Paste the API key in the popup into your "File Hosts Google Drive" settings in your website and close the popup window.
- Again, on the left menu, click on "OAuth consent screen", check the "External" radio button and click on "CREATE"
- Give a name (required) and a logo (optional) to your application, put your website's domain name in "Authorised domains" field (required), your website's privacy policy page's link into "Application Privacy Policy link" and the same for "Terms of Service" (required).
  Note: the "Privacy policy" and "Terms of Service" page are by default in "http(s)://your_domain_name.tld/page/privacy-policy" and "http(s)://your_domain_name.abc/page/terms-and-conditions"
- Click on "Save"
- On the left menu, click on "Credentials" and then on "Create credentials" and select "OAuth Client ID"
- On "Application type" select "Web application"
- In "Authorised redirect URIs" put "http://your_domain.name.tld/login/google/callback" hit Enter to validate and then put another one "http://your_domain.name.tld/gd_callback"
  Note: you can use http or https depending on whether your website under a secure protocol or not, and, with "www." or not.
- In "Authorized JavaScript origins" put "http://your_domain.name.tld" (as said above, with https / http, www. or not or all the possibilities if you want to)
- Once finished, click on "Save", you will get a "Client ID" and "Client secret" (the client secret corresponds to the "Secret ID" in your website settings)
- Copy/Paste those two IDs in their respective fields in your website / settings / file hosts /google drive (close the popup "OK")
- Save the changes in your website and thereafter click on "Connect" and select the account corresponding to your google drive (you can switch to another one later if you want to)
- Once accepted and agreed to your Google Console APP conditions, you will get a refresh token, enable "Google Drive" in your website if you want and save the changes.
  Note: you will probably get a "This app isn't verified" warning message while trying to connect your account with your app, just click on "Advanced" (a grey underlined text) and click on "Go to ... (unsafe)"
  Click on "Allow" to give your "Google Console APP" the authorisation to use your google drive (see, edit, create and delete files in your google drive) and again click on "Allow"

#### Dropbox

- Login to your Dropbox developers Here with your prefered email
- Once in, click on "Create app"
- Select "Dropbox API"
- Select whether you want to get files only from the app folder all dropbox.
- Give a name to your application, it's going to be your App folder's name, so, if you've choosen "App Folder" above, your requests to dropbox will be limited to this folder, else, to your whole dropbox.
- Click on "Create app"
- Once done, your App Key and APP Secret will be on the given page, copy/pase them into their respective fields in your website / settings / file hosts / dropbox, and save the changes (Update)
- For the "Redirect URIs", put "https://your_domain_name.tld/admin/settings/files_host" and click on "Add" (https is required)
- If you want this app this be uesd by different accounts, click on "Enable additional user" at the top of the page, by that, your app will be allowed to be used by 500 users (accounts) as max.
- Back to you website /settings / file hosts / dropbox, click on "Connect", connect with the dropbox accont you want to use, click on "Continue" and then "Allow", you will be redirected to your website with an "access token" place in its place for dropbox.
- Enable Dropbox if you want, save the change and that's it.

Note : The enabled "file hosts" will be visible in "Create" and "Edit" product's page.

Note : The email shown in a green message for each "File Host" corresponds to the email you connected with to each "File Host" (the account in use).

#### Working with Folders or Files

- You can only work with one of the two option, files or folders
- To replace files with folders or the opposite for your existing products/items, select the right option and edit your product with the new file/folder. Buyers of that item will automatically have access to that file/folder.
- You can set a default path for the folder that you want to access by default in your google drive or dropbox account, so that when you open google drive or dropbox modal to select a file/folder, only files/folder in that path will be shown.
- The default path for your google drive corresponds to a Folder ID that you can get from the address bar ("https://.../folders/1_w2z8qVsGFDl9yv4qYf55fLKQTh9lpLN" where "1_w2z8qVsGFDl9yv4qYf55fLKQTh9lpLN" is the folder id)
- The default path for your dropbox corresponds to a Folder Path that you can get from the address bar ("https://www.dropbox.com/home/Valexa" where "/Valexa" is the folder path)

Note : You don't need to and you should not make your folders and files accessible publicly or sharing them, they are served to buyers privately under your autorization via the API.

### Social Login

#### Google

In this step, you can either use the credentials you got from "Files Hosts" step (Client ID and Secret ID for google drive) or create other Credentials with another gmail account followwing the same steps mentionned in "Files Hosts" for google drive but without enabling "Google Drive API", because it's not necessary, just Credentials for "OAuth Client ID" and the "OAuth Consent Screen".

#### Github

- Create a github account (if you don't have one)
- Login to your github account
- on the profile dropdown menu, select "Settings"
- On the left menu, select "Developers settings" (the last option in the menu)
- On the left menu, click on "OAuth Apps" and then "New OAuth APp"
- Enter a name for yout application and a description
- For "Homepage URL" enter your website's url (https://your_domain_name.tld)
- For "Authorization callback URL" enter "https://your_domain_name.tld/login/github/callback", once finished, click on "Register application"
- Click on the application you've just created, you'll see your Client ID and Secret ID, (you can upload a logo for your github application if you want to)
- Copy/paste the Client ID and Secret ID to their respective fields in your website (settings / social login / github)

#### Twitter

- Create a twitter account (if you don't have one)
- Login to Twitter Developper website Here
- On the dropdown menu (the one with your name), select "Apps" and then click on "Create an app"
- Enter a name, a description for your application, your website's url (https://your_domain_name.tld), check the "Enable Sign in with Twitter" checkbox
- In "Callback URLs", enter "https://your_domain_name.tld/login/twitter/callback"
- In "Terms of Service URL", enter "https://your_domain_name.tld/page/terms-and-conditions"
- In "Tell us how this app will be used", tell them you want to allow users to login to website with their twitter accounts and for that you will need their usernames, emails and optionally their avatars (no tweets, no contacts, not anything else).
- Click on "Create" to complete the process
  You will need to wait for sometime for Twitter dev Team to review your request.
- Once your request is validated, login to twitter developers / Apps / Your application (the place your were in before)
- Click on "Keys and tokens"
- In "Consumer API keys", the (API key) corresponds to your twitter Client ID and (API secret key) to your twitter Secret ID
- Copy/Paste those two IDs to their places in your website / settings / social login / twitter

#### Linkedin

- Create a Linkedin account (if you don't have one)
- Login to Linkedin developpers Here
- On "My Apps" dropdown menu, select "Create app"
- Enter a name for your app, a company name
- In "Privacy policy" put "http(s)://your_domain_name.tld/page/privacy-policy"
- Upload a logo for your linkedin app
- For "Products" leave everything as is
- Accept the "Legal terms" and hit "Create" button
- Once done, from the previous dropdown menu (My Apps), select the App you've just created
- Select "Auth" on the top menu, scroll down to "Redirect URLs:" and put in "http(s)://your_domain_name.tld/login/linkedin/callback"
- At the top of the same page, you have your Client ID and Secret ID shown as 'Client Secret' for your Linkedin app
- Copy/Paste those to IDs to their respective fields in your website / settings / social login / Linkedin

#### Facebook

- Create a Facebook account (if you don't have one)
- Login to Facebook Developers Here
- From "My Apps" dropdown menu, select "Create App"
- Give a name to your App and a contact email and then click on "Create App ID"
- In "Add a Product" click on "Set up" for "Facebook Login" product
- In the left menu, under "Facebook Login" click on "Settings"
- In "Valid OAuth Redirect URIs" put "https://your_domain_name.tld/login/facebook/callback"
- In the left menu, click on "Settings" and then "Basic"
- In "App Domains" enter your domain name with and without www. (withour http)
  e.g. your_domain_name.tld and www.your_domain_name.tld
- In "Privacy Policy URL" put http(s)://your_domain_name.tld/page/privacy-policy
- In "Terms of Service URL" put http(s)://your_domain_name.tld/page/terms-and-conditions
- In "Category" select which category your website's activity belongs to
- The Client ID and Secret ID are at the top of the page (Settings / Basic), copy/paste them to their places in your website / settings / social login / facebook

#### VKontacte

- Create a VK account (if you don't have one)
- Login to VK Dev Here
- At the top menu, click on "My Apps"
- Click on "Create app"
- Give your app a title
- On "Platform" select "Website"
- In "Website address" and "Base domain" entre respectively "http(s)://your_domain_name.tld", "your_domain_name.tld"
- Thereafter, click on "Connect website"
- In "Terms and Conditions" write "http(s)://your_domain_name.tld/page/terms-and-conditions"
- In "Privacy Policy" write "http(s)://your_domain_name.tld/page/privacy-policy"
- In "Screenshots" Upload an image for your application if you want to
- On the left menu, click on "Settings"
- Scroll down to "Authorized redirect URI" end enter "http(s)://your_domain_name.tld/login/vkontakte/callback"
- In "Website focus" select your website activity
- The "App ID" at the top serves as "Client ID" and "Secure key" as "Secret ID" for your VKontacte login settings
- That's it, don't forget to enable it and save the changes.

### Search Engines

#### Google Site verification

- Connect to Google Webmaster Here
- In "Domain", enter your domain name "your_domain_name.tld" (without http) and click on "Continue"
- In the windows that shows up, copy the "google-site-verification" value, just the code after "=" sign
  e.g. google-site-verification=THE_CODE_HERE
- Paste it in your website / settings / search engines / Site verification / Google and save the changes (update)
- Back to google webmaster page, click on "Verify" to complete the verification

#### Bing Site verification

- Connect to Bing Webmaster Here
- In "Add a Site" under My Sites", enter your website's url "http(s)://your_domain_name.tld" and click on "Add"
- Next, copy the content value in '<meta name="msvalidate.01" content="THIS_ONE" />'
- Paste it in your website / settings / search engines / Site verification / Bing
- Back to Bing webmaster, click on "Verify" (the one under "Copy and paste a <meta> tag in your default webpage") to complete the verification

#### Yandex Site verification

- Connect to Yandex Webmaster Here
- Click on your profile and then "Settings"
- At the top menu, click on the "+" sign beside "Select site"
- Click on "Confirm" or close the popup that shows up
- In "Site address", enter your website url "http(s)://your_domain_name.tld" and hit "Add" button
- Once done, select the content's value '<meta name="yandex-verification" content="THIS_ONE" />'
- Copy/Paste this value in your website / settings / search engines / Site verification / Yandex

#### Google analytics

- https://support.google.com/analytics/answer/1009694?hl=en
- https://support.google.com/analytics/answer/1042508?hl=en

#### Robots

- https://developers.google.com/search/reference/robots_meta_tag#valid-indexing--serving-directives

## Categories

Categories can be created for both blog posts and items/products

## Products

- Price

  The price can be >= 0. 0 means the product is offered for free.

  You can specify a free download time when the price is greater than 0.

- Promotional price

  A price lesser than the normal one.

  You can specify an expiration time for the promotional price.

- Quantity in stock

  To work with stock, put a quantity in this field. 0 means out of stock.

  Leave empty if not applicable.

- Enable license

  This generate a license key for buyers for every purchased item.

  You can verify then is a license key is valid.

- File

  The main file can be uploaded from your device or just selected from the files that you have in your Google Drive or Dropbox, but, for those two last options, you need to configure and enable them in "Settings / Files Hosts" first

  Note: the main file must be an archive, a .zip, .7z or .rar file.

- Folder

  The main folder can be uploaded from your device or just selected from the folder that you have in your Google Drive or Dropbox, but, for those two last options, you need to configure and enable them in "Settings / Files Hosts" first

  Note: the main folder must not contain any subfolders.

- Thumbnail (Optional)

  The thumbnail is the item's icon, it will be visible beside the name of the item in the main page of the said item.

- Screenshots (Optional)

  A zip file containing all screenshots. They must be directly accessible not in subfolders.

- Cover (Required)

  The main image of the item.

- Video preview (Optional)

  A video preview to show in the place of the cover. The cover will serve as a video thumbnail in this case.

- Hidden content

  A content available for premium users only (users with a valid subscription or that have purchased the item).

- Trending status

  The trending status is based on two elements, the number of sales and the number of views.

  You have the choice to activate this status manually for the items that you want in the items/products list.

- Active status

  This status make an item published or not (visible or hidden for users).

Notes

Free items get added to the purchased items of the user if he/she decides to download them.

## Pages

Each page has a name, a short description for search engine, a main content and some tags

Pages are shown in the footer of the website.

## Posts

Each post has a name, short description for search engines, a cover, a category, a main content and some tags

You can add a new category if it's not already in the categories list, it will be created and added to your categories during the post's creation.

Note: make sure your posts's covers have the same dimension so the user interface doesn't look ugly.

## Coupons

- Value

  The value can be either monatary or percentage by setting the "Is percentage" option to Yes ot No.

- Products (required if "Subscriptions" if empty)

  The products to which you want to authorize the coupon.

- Subscriptions (required if "Subscriptions" if empty)

  The subscriptions plans to which you want to authorize the coupon.

- Users

  Users who can use the coupon. If left empty, all users can use the coupon.

- Allow one time use per user

  If enabled (Yes), the coupon can be used only one time by the same user.

Notes

100% Off coupon zerofies/nullifies the item's price to 0, once this concerned item is purchased, it's added to the purchased items of the user/buyer.

## Transactions

- Transactions can be marked as refunded, the refund is done then from your payment service account (PayPal, Stripe, ...).
- If a transaction is marked as refunded or not-paid, the buyer will lose access to the items of the transaction..
- The details about any transaction can be seen from "Actions / Details" in the transactions list.
- A "N-A" payment processor is used when a transaction contains only free items, user/buyer doesn't have to go through the normal payment process to complete a free-purchase.

## Comments

By default and as unique option, all comments and reviews need to be approved to be published and then visible to users/visitors.

## Users

The users list show if a user has verified his/her email address or not yet, how much he spent in your platform, how many items he purchased in your platform, when did he/she register to you platform and his/her email address.

You can delete users but cannot add users.

You can block users.

You can verify users email addresses manually.

## Reviews

As said previously, reviews need your approval to get published in your website.

## Newsletter

### Subscribers

List of subscribers to your newsletter

This list can be exported in csv format in case you want to use it in other third party newsletter services

### Create newsletter

- You can select specific emails (subscribers) to which you want to send the newsletter, or, leave the emails field empty to send it to all subscribers.
- The subject field is mandatory
- For the newsletter's body, you can either use the html editor and write you own newsletter, or, use the selections to prepare your newsletter.
  The search product field (dropdown list) is based on a search that returns 5 results so you don't load 1k items or more at once.
- You can preview the newsletter before you send it.

## FAQs

FAQs are shown in Support page.

## Support Messages

Messages sent by users/visitors through the support form (in Support page).

You can reply to them via "Actions / Reply"

If you did specify a "reply to" email address in "Settings / Mailer / Mail" then if the user/visitor decide to response back to your message, his/her message will be sent to this email address which may be different than the one you contacted him with.

## Validate licenses (Form & REST API)

You can validate license keys via the form in your website >> "Administration" >> "Validate licenses", on the left menu, you only need to enter the license key you want to validate and submit it.

You can also validate license keys via a REST API which requires an bearer token and a license key to validate. Example showing how to do that and your bearer token can be found in the same page mentioned previously (your website >> "Administration" >> "Validate licenses")

## Profile

Here you can update your profile.

If you don't want to update the password, leave it empty, else, type your new password in.

The profile picture can be loaded by clicking on the existing profile picture, it serves as a picture and a browse file button.

## Sitemap

Sitemaps are generated, created and updated automatically from the admin area and put in your website root under the following names (posts.xml, products.xml and pages.xml).

You can access them via "http(s)://your_domain_name.tld/{sitemap_name}" where {sitemap_name} is one of the three names mentioned above.

In case a file get corrupted just delete it from your website's root and get to the administration in your website and then to the items list of the concerned sitemap file (posts, products, pages), it will be recreated automatically.

## Add a language

To add a new language :

- Download Laravel Languages Package from Github or the following link https://github.com/Laravel-Lang/lang/archive/master.zip
- Extract the zip file
- Copy your language folder from "/lang-master/src" to "YOUR_WEBSITE_DOCUMENT_ROOT/resources/lang/"
- Copy your language json file from "/lang-master/json" to "YOUR_WEBSITE_DOCUMENT_ROOT/resources/lang/"
- In "YOUR_WEBSITE_DOCUMENT_ROOT/resources/lang/" create a new json file with the name of your language (take example of the existing ones : e.g en.json, fr.json, ...)
- Copy the content of fr.json or es.json file to your file.
- Translate the phrases/words on the left to your language and put the translated version on the right side (Key: Value). Keys are all the same for all files (English is the base language) and Values are the translation.

Note

Words preceeded/attached with a colon (:) are parameters, they must remain inchanged, don't translate them.

E.g : "The :attribute must be a valid role."

Translation to french : "Le :attribute doit être un rôle valid."

If your language is not in the downloaded folder (doesn't exist) :

- Create a folder with your language code (en, fr, ...)
- From your "YOUR_WEBSITE_DOCUMENT_ROOT/resources/lang/", copy the content of fr or es folder to your own folder
- Translate the 5 files like we explained above
- Move your folder to "YOUR_WEBSITE_DOCUMENT_ROOT/resources/lang/"
- Create a json file like the existing ones (fr.json, en.json, ...)
- Copy the content of es.json or fr.json to your json file
- Translate the keys as explained above
- Enable your language from your website Administration >> Settings >> General >> Languages
- If everything is done correctly, you should see your website with your language.s

## Assets

### CSS Files

- Administration
  public/assets/admin/app-ltr.css | app-rtl.css
- Non-Administration Tendra template
  public/assets/front/tendra-ltr.css | tendra-rtl.css
- Non-Administration Valexa template
  public/assets/front/valexa-ltr.css | valexa-rtl.css

Note

CSS files result from compiled scss files that can be found at "/resources/sass" folder.

You can read more about Laravel mix Here

### Javascript Files

- Administration
  public/assets/admin/app.js
- Non-Administration Tendra template
  public/assets/front/tendra.js
- Non-Administration Valexa template
  public/assets/front/valexa.js

## 2.0.1 Upgrade

- Before you try to upgrade your website, i highly recommend you to create a backup for your website, both script and database, and, i highly recommend you to apply the upgrade in a copy of your script+database to avoid any problem, if the upgrade is done correctly then execute it on your original script+database.
  If your website is at an insignificant stage (you have not started yet), you can omit the recommendation above and execute the upgrade directly or remove your old script + drop your database tables and launch a new installation with the new version.
- Installation steps :
- Move "upgrade" folder from the extracted zip file to your website document root ("/public" folder)
- Move "Script" folder from the extracted zip file to "/upgrade/releases/2.0.1/" (where you have an empty file named 'PLACE_THE_SCRIPT_FOLDER_HERE')
- Access the upgrade folder via the address bar (e.g. https://example.com/upgrade)
- The old versions should be disabled and the new one have a Yellow button to execute the upgrade.
- Click on "Execute" to install the new update.
- Once the upgrade is done, you will be redirected back to the available upgrades page, but, this time the latest one will be disabled also.
- Click on "Home" in the top menu to go back to your website home page.
- Remove the "upgrade" folder from your Document root ("/public" folder).