Giter VIP home page Giter VIP logo

marello's People

Contributors

24198 avatar aivus avatar alex-n-2k7 avatar alexandr-parkhomenko avatar anyt avatar bemzaslava avatar bitone avatar den-v avatar dimasoroka avatar dkhrysev avatar dxops avatar fitn avatar grygir avatar hotlander avatar ignat-s avatar iklymenko avatar ishakuta avatar joeymasip avatar kotfalya avatar madia-dev avatar mccar avatar mrfroasty avatar nidup avatar rgrebenchuk avatar santyagoseaman avatar sergeyz avatar vsoroka avatar x86demon avatar yshyshkin avatar yurio 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

marello's Issues

Allow extending dataBlocks in twig templates

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 %}

Add order to context action

To add orders to context please extend entity config:

Line 51 in Order.php:

"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

PHP compliance ?

Hello,

It would be appreciated if you could provide inside your composer.json the version PHP supported.

Thanks you,

Vincent

Purchase order grid error

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

Allow update customer from REST

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);
    }

Stock not de-allocated on Cancel Action against an order for a custom Workflow

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

Handle UniqueConstraintViolationException

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

Marello address: Integrity constraint violation

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.

Order item custom options

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.

Is Marello discontinued?

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?

Entity Management of "Invoice" not possible

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

ForbiddenException class doesn't exists

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.

Add purchase date for orders

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).

API Errors

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:

  1. When you go to Admin > Reports & Segments > Manage Segments
  2. In /api/doc#get--api-marelloproducts

Invalid entity mapping

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.

Quantity set to 0 on OrderItem line in order

On 1.5.1 release, if i create an order and set the quantity to 0 for an orderItem, the orderItem line is not in error, but the 0 value is accepted as a good value.

image

The order can be processed as a "normal" one, and stock movements can be visible too.

image

Allow to set product sku of order item

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

  1. add "@Orm\PreUpdate" to "public function prePersist()"
  2. add public setter for "productSku"

Migrate worker code in separate Components instead of Bundles

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?

Make product weight to required field

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.

Dataaudit for PriceType needs Integer Id

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.

Variant grid error

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

Update ORO Platform version

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?

Get Order from Shipment

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 ?

Order workflow ist not exposed

Accessing /api/rest/latest/orders/752 does not expose "workflow" anymore. Break after upgrading to Oro Platform version 2?

How to deal with ShippingMethodType?

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

Out of stock exception

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?

Validation error when creating product with prices via API

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": {}
    }
  }
}

Notice: Undefined index: selectAll in RowSelectionSelectAllListener

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.

Extend REST API

Hello,

it would be very nice if you could extend the REST API for full REST support

e.g. Sales Channels, Tax etc.

Call to undefined method getAssociationTargetClass()

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

Can't filter by "Supplier" on the "Purchase Orders" page

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)"} []

Remove namespaced twig paths with colons

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

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.