Giter Site home page Giter Site logo

offline-gmbh / oc-mall-plugin Goto Github PK

View Code? Open in Web Editor NEW
167.0 18.0 111.0 6.52 MB

:convenience_store: E-commerce solution for October CMS

Home Page: https://offline-gmbh.github.io/oc-mall-plugin

License: MIT License

PHP 84.98% Shell 0.01% HTML 13.68% JavaScript 0.22% CSS 0.35% TypeScript 0.34% Vue 0.43%
octobercms e-commerce octobercms-plugin laravel laravel-ecommerce hacktoberfest

oc-mall-plugin's Introduction

Mall

The all-inclusive e-commerce solution of OctoberCMS.

Build Status

Mall is a fully featured online shop solution for October CMS.

  • Manage Products and Variants
  • Virtual products (download only, no shipping)
  • Product services (e. g. extended warranty, on-site installation)
  • Stock management
  • Wishlists
  • Reviews and ratings
  • Checkout via Stripe, PayPal and PostFinance supported out-of-the-box
  • Custom payment providers
  • Integrated with RainLab.User
  • Multi-currency and multi-language (integrates with RainLab.Translate)
  • Shipping and Tax management
  • Specific prices for different customer groups
  • Unlimited additional price fields (reseller, retail, reduced, etc)
  • Custom order states
  • Flexible e-mail notifications
  • Easily extendable with custom features
  • Google Tag Manager and Google Merchant Center integrations

Read More

Team

The plugin was originally developed by OFFLINE GmbH. In the past years it has been improved and extended by the October CMS community.

The following maintainers are currently working actively on the plugin:

SamBrishes
SamBrishes
OFFLINE GmbH
OFFLINE

Requirements

  • PHP 7.4+ | 8.0+
  • OctoberCMS 2.2+ | v3.0+
  • MySQL 5.7+ | v8.0+ or MariaDB v10.2+ or SQLite v3.19+

We highly recommend not using SQLite on production environments, especially for larger Shops.

There is also a legacy version of this plugin available, that works with OctoberCMS v1. However, this version is no longer updated nor supported.

Support

For support and development requests please file an issue on GitHub.

Installation

The easiest way to get you started is by using the command line:

composer require \
   rainlab/user-plugin \
   rainlab/location-plugin \
   rainlab/translate-plugin \
   offline/oc-mall-plugin

Once the plugin is installed take a look at the official documentation to get everything up and running.

Benchmarks

Below are some totally unscientific benchmarks created on a lazy Saturday afternoon. These tests were run on a DigitalOcean CPU optimized Droplet with 2 vCPU and 4GB RAM. October was run on Ubuntu 1 8.04, PHP 7.2.10, Apache 2.4.19 and MySQL 5.7.24.

All measurements were done using the Bedard.Debugbar plugin and are the average load time over 10 page loads (I told you they were unscientific!).

Index size defines the size of the offline_mall_index table. This table includes de-normalized information about all Products and Variants. An index size of 1000 means there are 1000 individual Variants and Products stored. The demo data used was built using the php artisan mall:seed-demo command run in an infinite loop.

Category page load is the page load time measured when a category page is loaded. All stored products will be filtered, sorted (by sales count) and counted by the currently viewed category_id. Nine of these products will be displayed and the pagination will be built based on the returned number of results.

Filtered page load is the page load time measured when two filters are being enabled (filter by the color Red and the material Carbon). In this case all products will be filtered by their category, their color and their material. The pagination will be built based on the returned number of results.

Index size Category page load Filtered page load
1'000 290 ms 281 ms
5'000 301 ms 295 ms
10'000 324 ms 318 ms
50'000 448 ms 433 ms
100'000 586 ms 570 ms
200'000 912 ms 865 ms
300'000 1300 ms 1240 ms

Please be aware that these benchmarks are only here to show you how this plugin behaves under different loads and the times will vary depending on the hardware, configuration and setup of your installation. If you really want to know how well the plugin performs install it yourself and give it a go!

Contributing

Documentation

The raw documentation for this plugin is stored in the src/docs directory. It is written in markdown and Vue and built with VitePress.

for a live preview of the documentation, visit the root plugin directory, install the dependencies using npm i (ensure node.js and npm is installed on your machine first) and run the local server using npm run docs:dev.

Bugs and feature requests

If you found a bug or want to request a feature please file a GitHub issue.

Pull requests

PRs are always welcome! Open them against the develop branch. If you plan a time consuming contribution please open an issue first and describe what changes you have in mind.

oc-mall-plugin's People

Contributors

alxy avatar amdad avatar anik1ng avatar bombozama avatar chocolata avatar chrisvidal avatar chvuagniaux avatar daftspunk avatar damsfx avatar eoler avatar fl0cri avatar friendlyanon avatar gpluess avatar inalto avatar marcomessa avatar matteo-palazzo avatar mjauvin avatar omidmm16 avatar panakour avatar patrick-durrer avatar pindagus avatar publialex avatar pvullioud avatar rubenvanerk avatar sambrishes avatar samgeorges avatar stnkrisna avatar tobias-kuendig avatar vosco88 avatar xyz1123581321 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

oc-mall-plugin's Issues

How to handle weight property

Currently, if the weight property is not set properly on a product, the checkout fails as the total cannot be computed correctly.

I see two options to solve this:
1.) Make the weight required
2.) Set a default value (0), as there might be products of no physical nature, that have no weight

Tell me which one you prefer (or what you think about it), and I will create a PR.

Side note: Maybe the weight property needs also to be propagated to the variants, as different variants might have different weights.

Filters are broken

in_array() expects parameter 2 to be array, boolean given

You should be able to recreate problem on demo data. just click on filter sets (only color seems too work there), but on my data, even colors get broke too.

Add anonymous checkout or quick checkout without login/registration

Checkout page fields: [First_Name, Last_Name, Phone_Number, Notes, Delivery_Address, EMAIL]

When user prepared an order:
He should define mandatory fields -> First_Name, Last_Name, Phone_Number - mandatory.
Address is mandatory, only if delivery options is not selected as pickup from the store, which is free.

Promoted products in category

  • Add "promoted products" to category, make them sortable
  • By default, display them at the top of the product listing
  • Add a "featured" option to the CategoryFilter sorting dropdown

Currencies support issues

Hard to debug, and how to recreate this, But shop is able to forget to display all prices. All prices can get 0.00 values instead correct prices. Problem is able to fix them-self after a longer while. But if it come back it's critical error. Any idea what could have happened, to cause problem like this in newest version?

I will test it further to get any more useful information about this.

Price 'Reset filter' button do not work

Price filter is not removed from query/url after click on 'Reset filter'.
When price filter is active, removing params of other filters from query/url also do not work.

Add price accessors to the product model

$product->price // Returns whatever is entered in the backend (with/without taxes)

// To implement:
$product->price_pre_taxes // Returns always the price without taxes
$product->price_post_taxes // Returns always the price with taxes

The same accessors are needed for the old_price attribute.

An example on how to implement this can be found in the CartProduct model.

Translate plugin required

Why is the translate plugin required? If the shop only has one language, it should not be neccessary to have the translate plugin installed.

On top of that, october supports the @Behavior method to savely implement behaviors, that may not exist.

Enforce unique category slugs

  • Full slugs have to be unique /parent
  • Slugs with mulitple levels have to be unique /parent/child
  • Slugs for children don't have to be unique /parent-1/child and /parent-2/child

Optimize component naming

New proposed names:

  • Category -> ProductList
  • Product -> ProductDetail
  • CategoryFilter -> ProductFilter

Stock check does not take variants into account

I know that this is a WIP, but I will still log some issues I came accross here.

This one is in the Products component stock check: https://github.com/OFFLINE-GmbH/oc-mall-plugin/blob/develop/components/Product.php#L165-L176
This method simply takes the stock value from the base product, but does not take the availability of specific variants into account.
A solution would be to check if the Inventory management method is set to "Variants" and then load the availabilities accordingly.

Properties of a variant's parent are not saved in an order

When making an order with a product variant in the cart, all properties of the variant are serialized to the property_values and property_description columns of the offline_mall_order_products table.

But if we use a mix of product and variant properties, properties from the parent product won't be written.

IMO it would make sense to merge parent and variant properties in offline_mall_order_products.
I even suggest to do it directly in the getAttribute() of the variant because it may be useful in some other places.

Are you ok with this? If yes I can do a PR.

Language switching is broken

It seems like almost-permanent cache issue.

  1. When you change language by frontend lang switcher categories in do not change itself to match new lang, stays on en versions. Sometimes it does switch, but then switch back doesn't work. So it seems like it cannot refresh lang/translation page/cache like it should. But this can be other reason it didn't work.

  2. Even if you type whole url with translated slugs, it gives error.

image
image

BUT, not every time. When site somehow switch itself to Deutsch, then category will open from this link. Those two are critical to access translated content.
But also, one feature are missing to full translations support:

  1. URLs, are not translated on lang switch. Only prefix are changed.
    So in this case:
    https://mall.offline.swiss/en/category/bikes/mountainbikes
    should be switched to:
    https://mall.offline.swiss/de/category/translation-test/bekleidung

Possibility to delete orders

I'm unsure of this is a good idea, as orders can also be set to "cancelled" in case they are canceled. But sometimes you may wish to entirely remove an order from your system, so I think it can be considered puttin that little trash icon on the bottom right of the order page.

What do you think?

cart_product vs cart_products

I have no idea why this worked, but there is an ambiguity between the table definition and the relationd efinition here:

https://github.com/OFFLINE-GmbH/oc-mall-plugin/blob/develop/updates/builder_table_create_offline_mall_cart_products.php#L10 => offline_mall_cart_products
https://github.com/OFFLINE-GmbH/oc-mall-plugin/blob/develop/models/Product.php#L114 => offline_mall_cart_product

The easy fix is to replace it in the relation definition, but I am not sure if it has side effects.

Checkbox properties are not handled correctly when displaying the product

With checkbox values there are not multiple PropertyValues as with every other type. In this case there is only one value that is either 0 or 1.

Also, an additional label would be great so the user doesn't only see "Checked" or "Unchecked" but rather "With feature XY".

The easiest solution would be to remove the support for checkbox values since they can be emulated with dropdowns.

Single Article Filter options do not update themselves

When you update Variant/s Properties data, frontend Filters reflects that right away. Show up new filter options or remove ones. Works perfectly.
But when you change Single Article Properties.. nothing visible change on Filters part.
I checked on both local and server. The same issue.

Related to issue #59, since it fixed visibility of Single Articles on product list, but still not yet Filter options.

Should product variants have a product id?

Currently a variant can have a stock, so I assume that it's a physical item in the inventory.

But variants doesn't have a product id (user_defined_id) like products.
IMO variants should also have a user_defined_id that would override the one of the parent product if provided, exactly like stock does.

If you're ok with this, I can do a PR.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.