Skip to content

Prestashop mobile app built with React Native

Notifications You must be signed in to change notification settings

norellanac/ps_native

 
 

Repository files navigation

React Native App - Prestashop

_RN App, fetchin and sending data to prestashop ecommerce, using hooks like context, useReducer, added navigation and NativeBase UI library,react-navigation

  • ✨Magic ✨

Features

Already working:

  • JWT authorization/register (can't use prestashop cookies/context!)
  • Categories, Products with images (slider on product page)
  • Cart (add to cart, total cart)
  • Placing an order (Can set delivery address, can't choose payment method or carrier)
  • Custom page powered by EditorJS in module setings

TODO:

  • FixBug in PHP backend module proccesing the JWT token:


  • file backend/lelerestapi/classes/Main.php line 30 function getToken()
 public static function getToken() {
        foreach (getallheaders() as $name => $value) {
            if ($name === 'Authorization') {
                return str_replace('Bearer ', '', $value); 
            }
        }
        return false;
    }
  • Favourite products (Page with a list of current FP + make a button on product page work, backend should be working already)
  • Better architecture
  • Orders history in profile page
  • Carriers on order page

Markdown is a lightweight markup language based on the formatting conventions that people naturally use in email. As John Gruber writes on the Markdown site

The overriding design goal for Markdown's formatting syntax is to make it as readable as possible. The idea is that a Markdown-formatted document should be publishable as-is, as plain text, without looking like it's been marked up with tags or formatting instructions.

This text you see here is *actually- written in Markdown! To get a feel for Markdown's syntax, type some text into the left window and watch the results in the right.

Tech and references

uses a number of open source projects to work properly:

Name Latest Version
@react-navigation/core badge
native-base ^3.3.2
redux ^4.0.5
react-native-vector-icons ^9.0.0
react-native 0.67.2

Installation

Development

Want to contribute? Great!

Docker

Note:

change environment: var - PRESTASHOP_HOST=[--yourLANIP--] in your docker-compose.yml file

PrestaShop packaged by Bitnami

What is PrestaShop?

PrestaShop is a powerful open source eCommerce platform used by over 250,000 online storefronts worldwide. It is easily customizable, responsive, and includes powerful tools to drive online sales.

Overview of PrestaShop

TL;DR

$ curl -sSL https://raw.githubusercontent.com/bitnami/bitnami-docker-prestashop/master/docker-compose.yml > docker-compose.yml
$ docker-compose up 

Warning: This quick setup is only intended for development environments. You are encouraged to change the insecure default credentials and check out the available configuration options in the Environment Variables section for a more secure deployment.

version: '2'
services:
  mariadb:
    image: docker.io/bitnami/mariadb:10.4
    environment:
      # ALLOW_EMPTY_PASSWORD is recommended only for development.
      - ALLOW_EMPTY_PASSWORD=yes
      - MARIADB_USER=bn_prestashop
      - MARIADB_DATABASE=bitnami_prestashop
    volumes:
      - 'mariadb_data:/bitnami/mariadb'
  prestashop:
    image: docker.io/bitnami/prestashop:1.7
    ports:
      - '80:8080'
      - '443:8443'
    environment:
      - PRESTASHOP_HOST=192.168.0.10
      - PRESTASHOP_DATABASE_HOST=mariadb
      - PRESTASHOP_DATABASE_PORT_NUMBER=3306
      - PRESTASHOP_DATABASE_USER=bn_prestashop
      - PRESTASHOP_DATABASE_NAME=bitnami_prestashop
      # ALLOW_EMPTY_PASSWORD is recommended only for development.
      - ALLOW_EMPTY_PASSWORD=yes
    volumes:
      - 'prestashop_data:/bitnami/prestashop'
    depends_on:
      - mariadb
volumes:
  mariadb_data:
    driver: local
  prestashop_data:
    driver: local

How to run it (At least for Android devices)

  • install Prestashop module from /backend directory (archive it to ZIP first)
  • place your website link to /module/lelerestapi in Config.js (Keep in mind, your website need to have SSL in order for it to work on a final .apk/ios build)
  • npm install
  • yarn install
  • npx react-native run-android (android)

Requires Node.js to run.

Install the dependencies and devDependencies and start the server.

cd app
npm i
npx react-native start
npx react-native run-android

License

MIT

Free Software, Hell Yeah!

alt text alt text alt text alt text alt text alt text alt text alt text

About

Prestashop mobile app built with React Native

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 49.2%
  • JavaScript 41.1%
  • Java 3.3%
  • Objective-C 2.2%
  • Smarty 2.0%
  • CSS 1.1%
  • Other 1.1%