Giter Club home page Giter Club logo

jacked's People

Contributors

pettazz avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

jacked's Issues

New Admin Users Lose Names

Creating a new user through the admin module, always Last and sometimes First Names don't even make it to the database.

PayPal Done Fucked Up

PayPal integration is straight up broken thanks to a change in their REST APIs, and the SDK has also changed its API. So basically the whole thing needs to be rewritten with the new lib.

Export CSV for Shipping

Add a big magic button that exports Sale data as a CSV in a configurable format for things like UPS shipping. We can use a DatasBeard Table as a mapping of Sale data fields -> CSV column names.

Add support for optional dimensions field on Sales

Every Sale needs to have an optional field for any 'extra' values related to it that are not defined explicitly by the Product, such as size or color. For now they don't need to be anything dynamic or special, just a simple json object to represent the fields.

Later, we can have dynamic dimensions including strict type checking and validation for every Product.

But not yet.

Paging/Date limiting Sales

The Sales list in Purveyor's manager is a monolithic list of everything from the database. The bigger it gets, the slower it gets both in terms of the query putting load on MySQL and the browser being slow to render all those rows and their detail views.

We need some kind of simple paging or better yet a date picker to select date ranges

Changing table schema doesnt have checks for existing data

If you change the schema for any table with existing data, it will just shove the new schema in without any regard for the existing rows. It needs to:

  1. check that the existing rows are all valid within the new schema
  2. add/delete fields from existing rows as needed (probably should prompt the user about this)

Allow Percentage Promotion Values and Full Order Application

Promotions should allow for either fixed numeric or percentage values, as well as whether to apply to the full order or a single product, independently of each other. This allows us to create things like 20% off the full order including shipping, free shipping, etc.

Investigate adding fixed discount line items to PayPal API call. If this is impossible, we'll need a workaround for adding to existing line items, or not allow the combination of full order application + fixed value.

Search Sales

Finding a sale by anything other than email is incredibly difficult. We need a search/filter field.

Admin login loses querystring

When a direct URL to somewhere past auth redirects to the login page, we completely ignore the original URL and go to the home page on successful login.

Login form should include a hidden field for optional post-login redirect

Memcache needs to invalidate on update

With the timeout set to 10 seconds by default on most entries in MySQL's use of memcached, if within a single script, an UPDATE/REPLACE and then a SELECT are called using the same rows in the db, the SELECT will return data from memcached, which will now be outdated after the UPDATE/REPLACE. The easy fix is to invalidate cached rows (memcacher->delete()) after a successful UPDATE/REPLACE, but with the existing md5 hashing for queries, there's no way to easily determine which rows to invalidate. Hashing needs to be done more intelligently, and then invalidations can be added.

Support table.field definitions in find

Rather than just specifying "SomerelationName" => "some-lengthy-guid" and relying on auto-generated target/guid notations, allow for specifying tables and fields as the keys with dot notation: "Category.name" => "butts"

SyrupModel->save() Sucks at relations

hasOne relations, just simple guid joins, don't seem to be updated properly, and hasMany relations, it doesn't even try to handle.

It does actually do a really good job traversing all the relational objects in both cases, but it doesn't actually update the relations themselves. So you can change the User object's name in the database, but you can't change the User that this object is pointing to. Also the hasMany arrays just straight up blow my mind on a daily basis, so I can't really begin to explain the fix for that. Use the relationTable static property of the relation model? Oh god

JSON Validator Library Changed

Current version of the JSON Validator library in JACKED/lib/php-json-schema/Json/Validator.php has changes to __construct to switch from taking a path and loading a json file as a schema to just taking a string that is the schema itself. This is altered from the actual repo until either hasbridge/php-json-schema#15 is resolved or this is replaced with an actual fork.

Inline Row Edits Lose Data

Repro on MobileSafari:

Go to Manage Promotions in Purveyor
Click edit button in existing Promotion row
Change values, click save button
A different row will have lost its name (now "") and value (now 0), while the intended row is unchanged.

Support dynamic creation of Syrup models

Right now, the only way to register a model instance with Syrup is to just start using it and trigger lazy loading, which looks for the model's class file on the filesystem and instantiates it. Syrup needs to be able to also support programmatically creating a model instance and requesting that it be registered. This will most commonly follow a pattern like creating a new instance of BaseModel, then setting its magic members and field instances, then attaching it to Syrup with some special name that doesn't necessarily match a module.

Relational keys as criteria names have breaking parens

Doing something like this:

$posts = $JACKED->Syrup->Blag->find(
    array('AND' => array('Curator.canonicalName' => $tagName, 'alive' => 1))
);

results in a bit of SQL that looks like this:

WHERE  ( ( CuratorRelation.target = Blag.guid AND Curator.guid = CuratorRelation.Curator AND Curator.canonicalName )  = '-sciencefiction' AND Blag.alive = '1' )

The parens around the relational join are causing trouble, like hanging up mysqld on trying to cache the insane result of infinite rows.

Remove Moolah Code

It's dead and it's never coming back. Switching to Stripe from PayPal would also allow accepting bitcoin in the future.

Standardize guid/uuid usage

Right now we use "guid" and "uuid" pretty interchangeably in a few places throughout the code, which is technically inaccurate. We should clean up the implementation to be consistent, and improve things like storing them in the database. (We currently use VARCHAR which is unnecessarily large, when CHAR(36) would be fine, or ideally BINARY(16).)

New Module: Data's Beard

This module will be for a simplistic, admin-manageable, persistent data store. The goal is to enable users to create and edit what amount to tables of data without having to edit any code or add models to Syrup, and also to allow for site-implementation-specific data stores that can be used in templates and things but also be editable through Admin without requiring forking JACKED itself.

Show failed confirmations

For Moolah, transactions that haven't been confirmed within 30 minutes are cancelled, and PayPal probably has a similar time limit. We should show that on the Sales manage page instead of being forever pending.

Edit Loses Unchanged Thumbnails

Opening a post with an existing thumbnail for edit, then saving without changing the thumb saves NULL to the post's thumbnail field.

Support Syrup models at the app level

Currently Syrup will only try to load a model from its own core directory inside JACKED_MODULES_ROOT, which means if any app wants to create their own models they have to either fork JACKED or keep their model files untracked from git, which sucks.

Syrup should allow for a user configurable Models search path outside of the core stuff, like the way $PATH works, with core as the first search locations then conf-defined added after.

$0 Shipping Error

In createSale, if $shipping == 0, we don't construct the $details object and run into a "Undefined variable: details" error later on. Instead ignoring $details on a falsey value, we should default it to $0.

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.