sylius / sylius Goto Github PK
View Code? Open in Web Editor NEWOpen Source eCommerce Framework on Symfony
Home Page: https://sylius.com
License: MIT License
Open Source eCommerce Framework on Symfony
Home Page: https://sylius.com
License: MIT License
Once there is no way (at least a simple way) to override the DB's tables/repositories names, I think the sylius_
prefix should be removed. If a prefix is desirable, it can be solved using a listener that can be disabled.
I think that it would be nice to have possibility to upload images for categories and taxonomies that could be displayed in sidebar menu. BR.
It would be great if the field was ignored or, at least, failed graciously with a message.
OS: OSX Mountain Lion
PHP: 5.3.25
Symfony: 2.2.2-DEV
So payments and gateways are a lot more complicated than I had thought! As such, some more
detailed thought and community input is necessary before writing a bunch of code. This WIP
PR has two sections:
sylius.gateway
,$gateway
(an instance of BridgedGateway
; seecall
method and averify
method will be defined. When the PaymentProcessorcall
and verify
andHi:
On frontend knp_menu_render('sylius.frontend.main') shows non proper way of carts items
ie %items% and %total%. This is because in FrontendMenuBuilder.php title is taken from
$this->translate('sylius.frontend.menu.main.cart') which is only translatable string without variables.
So in Menu Builder should appear simply:
$menu->addChild('cart', array(
'route' => 'sylius_cart_summary',
'linkAttributes' => array('title' => $this->translate('sylius.frontend.menu.main.cart', array(
'%items%' => $cart->getTotalItems(),
'%total%' => $cart->$this->moneyExtension->formatMoney($cart->getTotal())
))),
'labelAttributes' => array('icon' => 'icon-shopping-cart icon-large')
))->setLabel($this->translate('sylius.frontend.menu.main.cart', array(
'%items%' => $cart->getTotalItems(),
'%total%' => $this->moneyExtension->formatMoney($cart->getTotal())
)));
One of the projects I'm working on is a paid content model. The application itself is very complex and as such should be decoupled as much as possible from Sylius (it will probably live in a different Kernel
).
We want to use Sylius as the "store", but are trying to figure out a way to facilitate the ACL rules for the content. The content is currently produced using Sonata with a bunch of different ContentProvider
classes that include things like basic CKEditor, impress.js editor, pdf generator, etc.
The current plan using existing Sylius functionality:
product_id
to the Content
modelProduct
entity in lifecycle events of Content
product_id
.This feels really clunky. Using all of the Sonata bundles is really heavy. There's two different administration panels. The app itself is not decoupled at all from Sylius, because it needs to listen for those events. It's just a mess.
Enter SyliusACLBundle! (and/or SyliusPaidContentBundle?).
The idea I have is to add something like an accessControls
property to Product. So instead of having to do the whole event and listener deal, it would just be a function of a completed order to check if it should create any ACL entries.
A simple AccessControllableInterface
in SyliusACLBundle would be created, implemented by any class that contains paid content.
This way, there would be 3 kernels: a BaseKernel
that contains all of the bundles shared between Sylius and MyApp, the SyliusKernel
, and MyAppKernel
. Assets would be properly separated. The list of benefits goes on.
So... I know there are a lot of other things that need to be completed with the existing set of bundles. But does anybody see a purpose for this sort of bundle? Or maybe a better way to make this happen?
I write you because i have a problem building product from prototype.
When I add image, and submit it fail. I see the form hasn't {{
form_enctype(form) }} in WebBundle,
Backend views Prototype, build.htmltwig. Then I add it but now it say
that path is null while make insert in database and throw an exception.
An exception occurred while executing 'INSERT INTO sylius_variant_image (path, created_at, updated_at, variant_id) VALUES (?, ?, ?, ?)' with params {"1":null,"2":"2013-05-07 16:26:42","3":"2013-05-07 16:26:43","4":12}:
Please, some idea??
Otherwise, the following error is produced:
The class 'Sylius\Bundle\CartBundle\Model\CartItemInterface' was not found in
the chain configured namespaces Sylius\Bundle\CoreBundle\Entity,
Sylius\Bundle\SettingsBundle\Entity, Sylius\Bundle\CartBundle\Entity,
Sylius\Bundle\AssortmentBundle\Entity, Sylius\Bundle\TaxationBundle\Entity,
Sylius\Bundle\ShippingBundle\Entity, Sylius\Bundle\PaymentsBundle\Entity,
Sylius\Bundle\PromotionsBundle\Entity, Sylius\Bundle\AddressingBundle\Entity,
Sylius\Bundle\SalesBundle\Entity, Sylius\Bundle\InventoryBundle\Entity,
Sylius\Bundle\TaxonomiesBundle\Entity, FOS\UserBundle\Entity
Find the according SO-topic here: Implement Sylius into Symfony2 Standard Edition
What do you think about using a Bootstrap Image Gallery/Colorbox or any other modal dialog to view full size thumbnails in backend/frontend?
Any comments welcome :)
When I try to buy with unregistered user , and with simultaneously register him i'm getting the error.
Catchable Fatal Error: Argument 1 passed to Sylius\Bundle\CoreBundle\Entity\Order::setUser() must implement interface FOS\UserBundle\Model\UserInterface, null given, called in /home/sargath/public_html/wb1/src/Sylius/Bundle/CoreBundle/Checkout/Step/FinalizeStep.php on line 79 and defined in /home/sargath/public_html/wb1/src/Sylius/Bundle/CoreBundle/Entity/Order.php line 88
Plz help. Thx
The default vagrant chef cookbook has two issues with Apache2:
I'm not that nimble with chef/cookbooks so I hope someone else can provide a quick fix.
This field is only working properly when doctrine fixtures was ran, with some data inside db.
On empty db and with empty schema it goes:
An exception has been thrown during the rendering of a template ("Parameter "path" for route "_imagine_sylius_gallery" must match ".+" ("" given) to generate a corresponding URL.") in SyliusWebBundle:Backend/Product:create.html.twig at line 21.
Hi,
I have added an ajax layer using the addItem function of the CartItemController and everything works fine:
$('#ajax_test_1').submit(function(e) {
e.preventDefault();
var url = "/web/app_dev.php/ajax/add?id=1";
$.ajax({
type: "POST",
url: url,
data: $(this).serialize(),
dataType: "html",
success: function(msg){
alert(msg);
}
});
The item with id=1 is added and the success message is displayed.
But when I try to create another function in that same controller, let's say ajaxAddItem (to keep the original addItem unaltered), with the exact same code inside, it just doesn't work.
Does anyone have any idea of what might cause the problem? What is specific to the addItem function that is not replicated in the new ajaxAddItem.
Thanks,
Alban
Hello awesome Sylius community!
I'm working on configurable currencies feature.
It allows defining exchange rate for multiple currencies. And now I need your feedback.
Currently we show prices in twig templates using SyliusMoneyExtension
(sylius_money
). I changed it a bit to be able to convert price into desired currency using CurrencyConverter
.
Maybe it have sense to split this into separate extension, sylius_price
?
Another thing we should discuss is currency context. User will be able to switch between offered currencies, similar to http://demo.opencart.com (currency swiitcher on top).
To be able to track chosen currency we may introduce CurrencyContext
with get/set currency methods. It will read currency from current user or from session if user is anonymous.
Thoughts?
What are guys you think about possibility to multiple delete things from, users, lists etc ?
Launching "php composer.phar create-project sylius/sylius -s dev" the installation abort with this error:
[Composer\Downloader\TransportException] The "https://api.github.com/repos/sensio/SensioDistributionBundle/zipball/4a2c803dc8db799 52ad5e71783c16178427bbc02" file could not be downloaded (HTTP/1.1 404 Not Found)
To fix it i edited the file composer.json (in Sylius new created path) and changed the version of sensio/distribution-bundle from 2.2.* to 2.2.x-dev
How do we get the French translation sitting in crowdin up and running? Thanks!
When I add taxonomy with example some spec signs like polish letter signs, I get a problem when adding product:
The name "muł" contains illegal characters. Names should start with a letter, digit or underscore and only contain letters, digits, numbers, underscores ("_"), hyphens ("-") and colons (":").
Edit:
This things goes only, when the main/root Taxonomy is added with special sign.
Hi, following good practice from contributors i enabled sof-deleting for order entity. Now when i add a new order "Place Order" it fail because constrain in data base.
Order has field order_number and it is unique, it is generated by OrderNumberGenerator in SalesBundle/Generator.
While it generate the number it call getLastOrderNumber that use findBy and is enable sof-deleting so it generate existing order number.
To solve this in Order Repository on CoreBundle y create method to return last order but now softdeleting is disable, and change on classs OrderNumberGenerator method getLastOrderNumber to use my new method.
I hope this help you, and please suggest other solution more elegant.
Thanks
Carlos.
//Sylius\Bundle\SalesBundle\Generator
protected function getLastOrderNumber()
{
// $lastOrder = current($this->repository->findBy(array(), array('createdAt' => 'desc'), 1));
$lastOrder = current($this->repository->findLast(1));
if (!$lastOrder) {
return str_repeat('0', $this->numberLength);
}
return $lastOrder->getNumber();
}
//namespace Sylius\Bundle\CoreBundle\Repository;
public function findLast($limit = 1)
{
$em = $this->getEntityManager();
$filter = $em->getFilters()->disable('softdeleteable');
$filter->disableForEntity('SyliusCoreBundle\Order');
$lastOrder = $this->findBy(array(), array('createdAt' => 'desc'), $limit);
$filter->enableForEntity('SyliusCoreBundle\Order');
return $lastOrder;
}
Hi, when I have created a product with a master variant I have to give it a price (which could be anything), even if I need to create variants which all have different prices to the master. By creating the variants the master price becomes redundant. However, this price still shows on the frontend homepage view, which in my case it shouldn't. Is this an oversight or a feature?
thanks
Hi, I've noticed an issue, when editing product, and adding taxonomies/categorization, and save it is all OK. But when I re-edit product and I go do Categorization Tab there are no taxonomies that I've already added to it.
Plz help.
PS.
On details of product i can see that categories are added, and in taxonomy menu they are displaying properly too.
Hi, I am using capifony to deploy my Sylius app to AWS EC2 Ubuntu using the deploy.rb supplied. Everything works fine up until Composer dependencies, and I get error below (ip replaced):
--> Updating Composer dependencies
Could anyone shed some light on why this might be happening please?
Thanks
I think this is a relation problem, when product has been bought, I can't delete him from db. Of course this is obvious, because he has a relation. But I think that some exception info should appear.
An exception occurred while executing 'DELETE FROM sylius_variant WHERE id = ?' with params {"1":1}:
SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (sylius_db
.sylius_order_item
, CONSTRAINT FK_77B587EDA75DE531
FOREIGN KEY (sellable_id
) REFERENCES sylius_variant
(id
))
Hello,
First: Thank you for the awesome library!
Sylius would be perfect in a product I have scheduled for imminent release, but I was confused about some things regarding the payment process. I'm hoping to figure out what's missing so I can bridge the gap for my project, and submit some pull requests if the code might help others.
sylius/omnipay-bundle
is included in sylius/sylius
or sylius/payments-bundle
.PaymentStep
in the Checkout process and the PaymentMethodType
in the PaymentBundle. But I can't seem to find how the actual entry of credit card information is facilitated? Is this a work in progress related to the integration of the Omnipay library?Again, thanks for the awesome library; I look forward to seeing what you come up with next, and hope to have an opportunity to contribute in the future!
I haven't seen any task related to it (and a code as well) so if it exists please just close it :)
I wanted to start talk about search engine that could be used in Sylius project.
E.g.
http://www.elasticsearch.org/ (http://www.elasticsearch.org/users/ + https://github.com/blog/1381-a-whole-new-code-search)
http://sphinxsearch.com/ (http://sphinxsearch.com/info/powered/)
...
What about a My account section ? Was it planned ? Because I haven't find anything about this.
A RFC for this feature is currently writing here : https://github.com/Sylius/Sylius/wiki/%5BRFC%5D-My-account-section
Hi, I recently installed the full stack of Sylius using
composer.phar create-project sylius/sylius -s dev
I have since added additional code to both bundles such as additional front end Controllers for About and Search, various view additions and an addition to an Entity. I thought of creating a new bundle to do this in but CoreBundle and WebBundle seemed to be the right place
So now I need to update my CoreBundle and WebBundle
How do I do this without overwriting my additional code
Have I done something wrong in the way I have added code
What is the correct way to do this?
Thanks
Soft deleted resources should surely be displayed in the backend (like products for example).
Here are my thoughts :
getSoftDeletedResources
) to ResourceBundle\Controller\Configuration
indexAction
and updateAction
methods of ResourceBundle\Controller\ResourceBundle\Controller
$getSoftDeletedResources = $config->get('getSoftDeletedResources', false);
if ($getSoftDeletedResources) {
$this->getManager()->getFilters()->disable('softdeleteable');
}
// get ressources
if ($getSoftDeletedResources) {
$this->getManager()->getFilters()->enable('softdeleteable');
}
sylius_backend_product_index:
pattern: /
methods: [GET]
defaults:
_controller: sylius.controller.product:indexAction
_sylius:
template: SyliusWebBundle:Backend/Product:index.html.twig
method: createFilterPaginator
arguments: [$criteria, $sorting, $getSoftDeletedResources]
criteria: {}
sorting: { createdAt: desc }
getSoftDeletedResources: {true}
I have not tested yet but I think this can work. However if I really don't know if it's good way to do. I'll code it if you find it valid.
Currently, Sylius doesn't have a guideline for translations. Is possible to find translations key as sylius.form.image.file
, sylius.image.file
, sylius.form.label.file
and some other variants. Furthermore, there are translations in YML
and XLIFF
format.
My suggestion is introducing a document with guidelines for coding, documentation, translations, etc and make it a requirement to get a PR accepted.
Hi!
What do you guys think about adding full list of user orders into user details page?
Hi,
I followed all the steps of installation successfully until command
php sylius/console doctrine:schema:create
which gives the following error:
Fatal error: Can't inherit abstract function Sylius\Bundle\InventoryBundle\Model\StockableInterface::getSku() (previously declared abstract in Sylius\Bundle\AssortmentBundle\Model\Variant\VariantInterface) in /Applications/MAMP/htdocs/delicecook/sylius/vendor/sylius/core-bundle/Sylius/Bundle/CoreBundle/Model/VariantInterface.php on line 27
Has anyone encountered that error?
Thank your for your help,
Alban
Hello, 2 quick questions:
Thanks!
Right now, while WebBundle & CoreBundle are here S-CI creates tons of useless comments inside of spec/
or Behat/
folders, this is done because it still contains old config where spec/
was black listed, but only in root, not recursively.
Hi,
I've just setup a new project and encountered this issue a the last step, just before the payment :
url : /sylius/web/app_dev.php/checkout/finalize/forward
error :
An exception occurred while executing 'INSERT INTO sylius_order (number, confirmed, items_total, adjustments_total, total, created_at, updated_at, user_id, shipping_address_id, billing_address_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params {"1":"000033","2":1,"3":4148,"4":3454,"5":7602,"6":"2013-05-19 22:17:32","7":"2013-05-19 22:17:32","8":17,"9":101,"10":"102"}:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '000033' for key 'UNIQ_6196A1F996901F54'
I've created the project with this command line :
composer create-project sylius/sylius -s dev
Should I made a mistake somewhere ?
Thanks for all
I've got , a small problem with routing. When my MenuBuilder inherits FrontendMenuBuilder class, it tries use routes from my Bundle but they don't work. Working routes are only available form SyliusWebBundle. Is there a re possibility to workaround this ? BR.
Hello,
Why isn't the user property of the order entity mapped in Order.orm.xml. Also I noticed that in the WebBundle, in the views/Backend/Order/show.html.twig, the part related to the user has been commented out (there is of course an error if decommented as the user field does not exist).
Is there any reason for having removed the relation between user and order?
Thanks,
Alban
Hi, I need to add a method to Sylius\Bundle\CoreBundle\Repository\ProductRepository.php which I am calling from my own controller, in order to do an A to Z search
$em = $this->getDoctrine()->getEntityManager();
$productEntities = $em->getRepository('SyliusCoreBundle:Product')->findByFirstLetter($letter);
However, it doesn't find the repository class. It finds the Product entity but not the method in the repository. I've looked in the Product entity and I can't see how it is associated with the repository as there is no ORM repositoryClass annotation like this:
@Orm\Entity(repositoryClass="Sylius\Bundle\CoreBundle\Repository\ProductRepository")
I tried adding it but it gets ignored. Please can someone tell me how the repository class is associated with the entity and how I can add/call methods on it please?
Thanks
It's very hard to do translation on global level (though all bundles) atm.
Main reason is difference in formats (eg. Addressing bundle is yml). I'm trying to extend all bundles in my app and create translations, now I can do that and merge them in their respective formats, but wouldn't it be easier if there was a global effort in converting those to one singular format?
Opening discussion as I will be doing development on app based on sylius and am planing on helping wherever I can.
What about adding a real customer ID (that could be printed on invoices) and a registration date for customers. What do you think about it ?
Maybe the customer ID could be a slug defined with first name and last name, plus a number. For example JANVIJU8975.
After sylius/console sylius:install --fixtures
get an error:
...
13:32:52 [file+] /home/andrey/sandbox/sylius.loc/sylius/sylius/../web/assets/compiled/backend_backend_3.css
13:32:52 [file+] /home/andrey/sandbox/sylius.loc/sylius/sylius/../web/js/b7d7eda.js
13:32:52 [file+] /home/andrey/sandbox/sylius.loc/sylius/sylius/../web/js/b7d7eda_sylius-property-choices_1.js
Careful, database will be purged. Do you want to continue Y/N ?Y
purging database
loading [1] Sylius\Bundle\CoreBundle\DataFixtures\ORM\LoadPromotionsData
loading [1] Sylius\Bundle\CoreBundle\DataFixtures\ORM\LoadCountriesData
PHP Fatal error: Class 'ResourceBundle' not found in /home/andrey/sandbox/sylius.loc/sylius/vendor/symfony/symfony/src/Symfony/Component/Locale/Locale.php on line 51
After going to hyttp://sylius.loc/ got blank page. Turning on errors_reporing in index.php changes nothing.
andrey@z11:~/sandbox/sylius.loc/sylius$ php -v
PHP 5.4.6-1ubuntu1.2 (cli) (built: Mar 11 2013 14:57:54)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
with the ionCube PHP Loader v4.2.2, Copyright (c) 2002-2012, by ionCube Ltd.
when loading the data fixture i got this error :
PHP Parse error: syntax error, unexpected '[' in /var/www/sylius/vendor/sylius/core-bundle/Sylius/Bundle/CoreBundle/DataFixtures/ORM/LoadProductsData.php on line 276.
i solved it by using :
$productName = explode(' ', $product->getName());
$image = clone $this->getReference(
'Sylius.Image.'.strtolower($productName[0])
);
After a fresh installation with "php composer.phar create-project sylius/sylius -s dev", i've created the database with "php app/console doctrine:database:create" and then, when i run the command "php app/console doctrine:schema:create" i've got the error:
[Doctrine\ORM\Mapping\MappingException] It is illegal to put an inverse side one-to-many or many-to-many association on mapped superclass 'Sylius\Bundle\ShippingBundle\Entity\ShippingMethod#rules'.
The association Sylius\Bundle\CoreBundle\Entity\Taxon#taxonomy refers to the inverse side field Sylius\Bundle\CoreBundle\Entity\Taxonomy#taxons which does not exist.
The field Sylius\Bundle\CoreBundle\Entity\Taxon#children is on the inverse side of a bi-directional relationship, but the specified mappedBy association on the target-entity Sylius\Bundle\CoreBundle\Entity\Taxon#parent does not contain the required 'inversedBy=children' attribute.
I worked a litlle bit on the Sylius interface, look screen shots below :
It is only the list of orders but it can be applied to all crud lists, this interface is more compact... With it :
Not on the screen shot :
I think the menu on the left on the left could be removed because it is the same as the top menu, on the small screen it take space for nothing.
What do you think about that?
Thank
I've noticed that when I use fixtures to load examples from Sylius fixtures , everything seems OK when i delete something, from those data.
But when i add manually an Order or Product and then try to delete it , error still appears with:
An exception occurred while executing 'DELETE FROM sylius_addressing_address WHERE id = ?' with params ["202"]:
SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (sylius_dev
.sylius_core_cart
, CONSTRAINT FK_90C0F3079D0C0E4
FOREIGN KEY (billing_address_id
) REFERENCES sylius_addressing_address
(id
))
Plz. Help thx
[Feature]: Buy without registration. / Buy as a guest
Hi, In the backend, if I try and edit images, and click 'Choose file' nothing happens. If I remove the overlay span node to reveal the html file input below, then this works. I am using Chrome browser on Mac mountain Lion.
The flash messages are useful for applications with GUI. For REST applications, normally, it doesn't have any usefulness. My suggestion is, once Sylius is modular and event based, extract all flash message and use events for creation. At this point is possible enable and disable flash messages beyond have all in one place, improving the maintainability.
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.