marellocommerce / marello Goto Github PK
View Code? Open in Web Editor NEWMarello
License: Other
Marello
License: Other
For some reason it's very useful to allow extending dataBlocks in twig templates. For instance prepend to this set
{% set data = {
'dataBlocks': dataBlocks,
} %}
this code
{% if data is defined and data.dataBlocks is defined %}
{% set dataBlocks = dataBlocks|merge(data.dataBlocks) %}
{% endif %}
{% set data = {
'dataBlocks': dataBlocks,
} %}
Then you can create your own twig template like this
{% extends '@!MarelloProduct/Product/view.html.twig' %}
{% block content_data %}
{% set customBlock %}
<div class="widget-content">
Custom Block
</div>
{% endset %}
{% set dataBlocks = [{
'title' : 'Custom Block'|trans,
'subblocks': [{
'title' : null,
'useSpan': false,
'data' : [
customBlock
]
}]
}] %}
{% set data = {
'dataBlocks': dataBlocks,
} %}
{{ parent() }}
{% endblock %}
To add orders to context please extend entity config:
"grid"={
"default"="order-grid",
"context"="order-for-context-grid"
}
You also need to define the datagrids
order-grid:
source:
type: orm
query:
select:
- o
from:
- { table: MarelloOrderBundle:Order, alias: o }
join:
left:
billingAddress:
join: o.billingAddress
alias: ba
shippingAddress:
join: o.shippingAddress
alias: sa
columns:
id:
label: marello.order.id.label
orderNumber:
label: marello.order.order_number.label
frontend_type: string
orderReference:
label: marello.order.order_reference.label
frontend_type: string
grandTotal:
label: marello.order.grand_total.label
type: localized_number
method: formatCurrency
context_resolver: Marello\Bundle\DataGridBundle\Grid\FormatterContextResolver::getResolverCurrencyClosure
align: right
sorters:
columns:
orderNumber:
data_name: o.orderNumber
orderReference:
data_name: o.orderReference
default:
orderNumber: "%oro_datagrid.extension.orm_sorter.class%::DIRECTION_DESC"
filters:
columns:
orderNumber:
type: string
data_name: o.orderNumber
orderReference:
type: string
data_name: o.orderReference
properties:
view_link:
type: url
route: marello_order_order_view
params:
id: id
actions:
view:
type: navigate
link: view_link
icon: eye
rowAction: true
action_configuration: [@marello_order.datagrid.action_permission_provider, "getActionPermissions"]
order-for-context-grid:
extends: order-grid
options:
entityHint: order
entity_pagination: true
toolbarOptions:
pageSize:
default_per_page: 10
routerEnabled: false
So emails can be connected to orders with the "Add context" button
Hello,
It would be appreciated if you could provide inside your composer.json the version PHP supported.
Thanks you,
Vincent
Error like #10 .
Replace alle 3 occurrences of
"l.stock - l.allocatedStock"
with
"l.inventory - l.allocatedInventory"
in file
Marello/Bundle/PurchaseOrderBundle/Resources/config/datagrid.yml
Hi,
just allow updating Customer data with REST API
add following lines to Marello/Bundle/OrderBundle/Controller/Api/Rest/CustomerController.php
/**
* REST PUT
*
* @param int $id Customer id
*
* @ApiDoc(
* description="Update Customer via Rest api",
* resource=true
* )
* @return Response
*/
public function putAction($id)
{
return $this->handleUpdateRequest($id);
}
Change $className = ExtendHelper::buildEnumValueClassName('marello_inv_reple'); to
$className = ExtendHelper::buildEnumValueClassName('marello_product_reple');
Actually, with the default Workflow (WF), it is not possible to cancel an order after pick and pack
transition.
If, for specific needs, you declare the cancel_action
available on other transitions, AFTER the pick and pack
transition, the stock management is wrong.
What it is expected :
Once an order is canceled, if a stock has been allocated, then, this allocation should be de-allocated.
What it is actually done :
If an order is cancelled after the pick and pack
transition, the allocated stock is not released.
That’s the InventoryUpdateContext that’s created when going into the CancelAction. But the last boolean (true) is for setting the context to ‘virtual’, which basically means it will ‘handle’ the balancedInventory instead of the ‘normal’ one….
credits @24198
EDIT
This also happens when the allocation is set to a transition prior to pick and pack
Hello,
if I wrongly post the same order a second time an UniqueConstraintViolationException is thrown. Everything fine. But the server responses "401 Unauthorized". 500 or any similar error code is better.
Thanks
Hi,
forcing schema update changes "updated" field in marello_address to "NOT NULL". But migration allows NULL. Facing this error:
<b>Fatal error</b>: Uncaught PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'updated' cannot be null in /Sites/marello/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:91
Entity MarelloAddress has to handle this error.
After upgrading to RC I had to rename manually field "channeltype" to "channel_type" in table "marello_sales_sales_channel".
There is no field for custom options of a an ordered item. I think it's a required field to handle orders in Marello. Please add a field to show custom options. This field can be a "data" field where custom options can be stored serialized.
I see that the git repo hasn't been updated since last year, and I see no activity neither in the marello Application repo.
What are the news about Marello?
API call for product returns with empty "inventoryItems"
Thrown error
Unable to generate a URL for the named route "marello_invoice_index" as such route does not exist.
I guess it should be "marello_invoice_view" like in line 19 in file InvoiceController.php
Hello,
It seems that in Marello 3.0.1, in Marello\Bundle\ReturnBundle\Controller\ReturnController
if you try to create a return from a non shipped order, you throw a Oro\Bundle\SecurityBundle\Exception\ForbiddenException
, but it seems that this class doesn't exists.
Like #23 field "updated_at" in "marello_product_product" cannot be null.
Please add "Purchase Date" to orders to save the date of purchase from sale channel. Attribute CreatedAt is always updated with latest timestamp (see EntityCreatedUpdatedAtTrait).
There are various parts of the API that return the same error:
{
"errors": [
{
"status": "400",
"title": "filter constraint",
"detail": "The filter is not supported.",
"source": {
"parameter": "q"
}
}
]
}
Two places we've observed this are:
Fresh install of RC has invalid mapping fields
$ app/console doctrine:schema:validate
[Mapping] FAIL - The entity-class 'Marello\Bundle\ProductBundle\Entity\Product' mapping is invalid:
* The field Marello\Bundle\ProductBundle\Entity\Product#suppliers is on the inverse side of a bi-directional relationship, but the specified mappedBy association on the target-entity Marello\Bundle\SupplierBundle\Entity\ProductSupplierRelation#product does not contain the required 'inversedBy="suppliers"' attribute.
* The field Marello\Bundle\ProductBundle\Entity\Product#salesChannelTaxCodes is on the inverse side of a bi-directional relationship, but the specified mappedBy association on the target-entity Marello\Bundle\ProductBundle\Entity\ProductChannelTaxRelation#product does not contain the required 'inversedBy="salesChannelTaxCodes"' attribute.
[Database] FAIL - The database schema is not in sync with the current mapping file.
After upgrade to RC I had to add manually new field "preferred_supplier_id" in "marello_product_product".
can't support magento2 Configurable products?
Function setProductSku does not exist in "OrderItem". "productSku" is set with
/**
* @ORM\PrePersist
*/
public function prePersist()
{
// prevent overriding product name if already being set
if (is_null($this->productName)) {
$this->setProductName($this->product->getName());
}
$this->productSku = $this->product->getSku();
}
But I want to change order item e.g. customer wants a different one. Two options for suggestion
Hello,
Marello's source code is separated in several Symfony bundles, which is useful if you use Marello's application as a whole, but can create some issues when you need to integrate it with other systems (e-commerce, crm, pim, etc...). I suppose some simple integrations will come with OroCRM, Akeneo and other Symfony applications, but what about incompatible systems?
A move I think was good in Akeneo is moving worker code into components, adding several interfaces which enabled code reuse and easy data backend switching. Bundles then became glue code and config between Symfony and the components. In the case of Marello it could be for different complexity of warehouse management, different tax calculation engines, etc.
Do Marello has a plan to make such move in the near future? Would PR in this way would be accepted?
H,
creating packing slip require weight of product. If weight is not set creating packing slip fails. Solution is to change requireness of weight information in packing slip or product information.
Field "inventory" of rest call
/api/rest/latest/products
is "null". Removing "result_name" hydrates entity correctly in ProductApiEntityManager.
Hi,
make Customer extendable to configure and extend with entity management.
thanks
Replace line 168
" - i.replenishment = 'never_out_of_stock' "
with
" - p.replenishment = 'never_out_of_stock' "
in file
Marello/Bundle/PurchaseOrderBundle/Resources/config/datagrid.yml
Hello,
I would need a hand to understand the semantics used in the code (class names and methods). @jakubbabiak and @24198 should have the answer(s).
InventoryAllocation
InventorItem->(get|set|modify)AllocatedQuantity()
vs InventorItem->(get|set|modify)Quantity()
vs InventorItem->getVirtualQuantity()
What is an inventory allocation, and the difference between the quantity, the allocated quantity and the virtual quantity ?
Thanks
Consumer generates SQL error
app.ERROR: Consuming interrupted by exception. "An exception occurred while executing 'INSERT INTO oro_audit (action, logged_at, object_id, object_class, object_name, version, transaction_id, owner_description, additional_fields, organization_id, impersonation_id, user_id, type) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params [null, "2018-09-24 13:18:23", "msrp", "Marello\\Bundle\\PricingBundle\\Entity\\PriceType", "msrp Msrp Price", null, "99ca1fe5-711e-4acd-8b64-97e12d665b1e", null, "YTowOnt9", null, null, null, "audit"]: SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value: 'msrp' for column 'object_id' at row 1"
object_id has to be Integer but Id if PriceType is string.
Going to
http://localhost/marello/marello/product/view/2?_enableContentProviders=mainMenu
causes
An exception has been thrown during the rendering of a template ("[Semantical Error] line 0, col 47 near 'stock) AS stockLevel': Error: Class Marello\Bundle\InventoryBundle\Entity\StockLevel has no field or association named stock") in vendor/marellocommerce/marello/src/Marello/Bundle/ProductBundle/Resources/views/Variant/widget/info.html.twig at line 8.
changing all occurrences of
- SUM(l.stock) AS stockLevel
to
- COALESCE(SUM(l.inventory), 0) AS stockLevel
in file
Marello/Bundle/ProductBundle/Resources/config/datagrid.yml
solves that error
have a plugin about amazon order connect to marello?
The latest ORO Platform version came with quite a few interesting features (for example more simpler configurations). AFAIK the newest (1.10) version is close. Since Marello is still in alpha, BC breaks caused by upgrading should not be a concern. Do you plan to update prior to the first beta version?
Hello,
We have an association OneToOne from Marello\Bundle\OrderBundle\Entity\Order to Marello\Bundle\ShippingBundle\Entity\Shipment. So we can attach a Shipment to the Order, and get this Shipment from the Order.
Would it be possible to have a backward reference : getting an Order from the Shipment ?
Accessing /api/rest/latest/orders/752 does not expose "workflow" anymore. Break after upgrading to Oro Platform version 2?
Use Oro\Bundle\EmailBundle\Provider\EmailTemplateContentProvider::getTemplateContent(EmailTemplateCriteria $criteria, Localization $localization, array $templateParams) instead
Hello,
when I create an order with REST, shippingMethodType is NULL and posibility to pass parameter with REST is not given. I set this field in a quick and dirty solution during workflow transition like this
- @call_method:
object: $order
method: setShippingMethodType
method_parameters:
- primary
Exists a common way to create order from Rest?
What means "primary" and which other values do exist either?
Thanks
Hi,
if I post an order with REST and the item is out of stock I get "400 - Bad request". In the profiler I see for error "Cannot order more inventory than available".
Is it possible the send an OutOfStock Exception with HTTP response?
After upgrading to RC I had to rename manually "purchaseOrderNumber" to "purchase_order_number" in "marello_purchase_order".
The request to POST /api/rest/v1/products
with body:
{
"id": null,
"name": "Test",
"sku": "123",
"desiredStockLevel": 0,
"purchaseStockLevel": 0,
"replenishment": "end_of_life",
"status": null,
"createdAt": null,
"updatedAt": null,
"prices": [{
"currency": "CHF",
"value": "100.0000"
}],
"inventoryItems": [],
"channels": []
}
results in 400 Bad Request
:
{
"code": 400,
"message": "Validation Failed",
"errors": {
"children": {
"replenishment": {},
"name": {},
"sku": {},
"status": {},
"weight": {},
"desiredStockLevel": {},
"purchaseStockLevel": {},
"prices": {
"errors": ["This value is not valid."]
},
"channels": {},
"inventoryItems": {}
}
}
}
After upgrading to v1.4, we had issues with undefined index notice (which converts to Symfony exception and stops rendering).
The problem is on Marello\Bundle\DataGridBundle\EventListener\Datagrid\RowSelectionSelectAllListener
lines 132-133
The condition does not look correct to me - the !empty($rowSelectionConfig['selectAll']) || (bool)$rowSelectionConfig['selectAll']
part when $rowSelectionConfig['selectAll']
is actually empty, evaluates the first part to false and this means it continues to evaluate next part - which actually uses the value that we have just established to be empty.
I don't fully understand the underlying intention to be able to submit a correction, but to me it seems that the last part is not needed at all because any value that evaluates as boolean true would already be caught in the !empty(...)
part as any truthy value is considered non-empty.
Please let me know if I should submit a PR with the last condition removed or if there is a different solution to this.
Hello,
it would be very nice if you could extend the REST API for full REST support
e.g. Sales Channels, Tax etc.
Oro: 3.1.6
Marello 2.0.0
Fatal error: Call to undefined method Marello\Bundle\CoreBundle\Serializer\EntitySerializer::getAssociationTargetClass() in vendor/marellocommerce/marello/src/Marello/Bundle/CoreBundle/Serializer/EntitySerializer.php:119
Bug:
Can't filter by "Supplier" on the "Purchase Orders" page.
Reproduced On:
Marello version: 1.3.0
Also on the demo: https://demo.marello.com/
Expected:
Update the list with the Supplier filter.
Actual:
Send back an error:
Data loading failed, try reloading the page. If the issue appears again please contact your administrator.
In the prod log:
[2018-03-19 18:18:39] request.CRITICAL: Uncaught PHP Exception Doctrine\ORM\Query\QueryException: "[Semantical Error] line 0, col 71 near 'supplier LIKE': Error: Invalid PathExpression. Must be a StateFieldPathExpression." at /var/www/html/vendor/doctrine/orm/lib/Doctrine/ORM/Query/QueryException.php line 63 {"exception":"[object] (Doctrine\\ORM\\Query\\QueryException(code: 0): [Semantical Error] line 0, col 71 near 'supplier LIKE': Error: Invalid PathExpression. Must be a StateFieldPathExpression. at /var/www/html/vendor/doctrine/orm/lib/Doctrine/ORM/Query/QueryException.php:63, Doctrine\\ORM\\Query\\QueryException(code: 0): SELECT po.id FROM MarelloPurchaseOrderBundle:PurchaseOrder po WHERE po.supplier LIKE :supplier2057250939 at /var/www/html/vendor/doctrine/orm/lib/Doctrine/ORM/Query/QueryException.php:41)"} []
It's not possible to override templates if you use twig paths with colons. This is deprecated (Symfony Doc).
In the past, Symfony used a different syntax to refer to templates. This format, which uses colons (:) to
separate each template path section, is less consistent and has worse performance than the Twig syntax.
Please change "Template" annotations in all controllers. For instance have a look at product view action Link
Change
@Config\Template("MarelloProductBundle:Product:view.html.twig")
to
@Config\Template("@MarelloProduct/Product/view.html.twig")
Thanks
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.