offline-gmbh / oc-mall-plugin Goto Github PK
View Code? Open in Web Editor NEW:convenience_store: E-commerce solution for October CMS
Home Page: https://offline-gmbh.github.io/oc-mall-plugin
License: MIT License
:convenience_store: E-commerce solution for October CMS
Home Page: https://offline-gmbh.github.io/oc-mall-plugin
License: MIT License
Automatically generate backend settings form from a PaymentProvider class
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.
if the inventory management method is changed (old variants are still there, stock and price values mess up
see #32
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.
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.
or
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.
When trying to remove a brand from a product (tested -> https://mall.offline.swiss/backend/offline/mall/products/update/1), needs two clicks to remove a brand from the readonly input.
The ProductsSearchProvider.php
currently only searches for contents in the main language. To search through other languages it has to be extended to also look in rainlab_translate_attributes
.
For an example on how to do that see https://github.com/OFFLINE-GmbH/oc-site-search-plugin/blob/develop/classes/providers/RainlabBlogResultsProvider.php#L83
When creating new product, we have direct field to enter price value. After last changes of how prices are stored (separate tables) it do not save it's data.
Only 'Edit stock and price values' save data correctly.
Some are snake_case
others are camelCase
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.
Did you encounter a problem like this one before?
https://stackoverflow.com/questions/17274556/pdo-error-sqlstatehy000-general-error-2031
New proposed names:
Category
-> ProductList
Product
-> ProductDetail
CategoryFilter
-> ProductFilter
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.
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.
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.
The setting can be placed on the general settings form.
The setting is used here:
https://github.com/OFFLINE-GmbH/oc-mall-plugin/blob/develop/models/Order.php#L158
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.
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?
The model must implement the NestedTree or Sortable traits.
The dynamic setting of the encryptable config will have to be moved to the model::extend method
Like "Pay on Delivery", "Bank transfer"
This kind of payment need to display extra info on the bill and the email :
Work in progress
https://github.com/OFFLINE-GmbH/oc-mall-plugin/compare/develop...inetis-ch:offline_pay?expand=1
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.
/parent
/parent/child
/parent-1/child
and /parent-2/child
$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.
Plugin.php:234
After type-in some values into custom properties and save, still no changes stored.
Problem exist only for main Article. Variants store data correctly.
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.
When you add Article it didn't display on frontend at all. Only products with variants works.
Product:
{ CHF: 100, EUR: 90 }
Variant:
{ CHF: 110, EUR: null }
In this case asking for the formatted price of the variant in EUR gives 1.00€.
see #51 (comment)
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.
It seems like almost-permanent cache issue.
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.
Even if you type whole url with translated slugs, it gives error.
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:
This is a simple search/replace.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.