Sylius customer and products relations - sylius

I need to know if sylius have support for that an customer can create your own products.
The model of my project is: a customer can create and sale your own products, and can to consump products that was created by other customers.
I see that i can create a rol and to add the permissions to an customer to make manage a product, but this solution show me all products that other customers can to create, that is, I not have a filter by customer.
I need to know if that is possible to make that with sylius of any way (config, overwriting an entity)?

Sylius doesn't support out of the box this solution, but it is possible to build product of that kind. I worked on one project similar to Etsy on some previous version of Sylius (two year ago) and we achived this quite easily. You will need to write a lot of your custom logic but it is possible. Let me know if you need help in developing this, I am sure we can help.

Related

How to display products from external API in prestashop

I want to integrate products from live external api into prestashop 1.6, so user can add them to cart and make orders also.
I found a solution to override the function that call products from Database but the website countaine modules that call products directely from database (it is not solution to override the modules also, because if there is a new ones it hard to do the same work).
I'm waiting for you solutions.
Thank you
In your case I see two solutions:
- You import the products in question in your Prestashop shop
- You change the product classes, Categories, etc ... to no longer query on the database, but on your API
Regards,

Remove default attributes from prestashop 1.6.1

I need help.
I need to know if there is any possibility of deactivating the default attributes of prestashop; And Do not add to the shopping cart. ?
The problem is the following,
I have a number of products created in prestashop, (2770) each product with color combinations. (9 different colors each product) and each product depends on a color and quantity (stock) to buy.
The problem comes when I use another module, to create all other combinations (m2 x m2) etc.
With this new module, I manage everything. Prices, quantities, colors, sales by meters etc.
But with this module, I have to eliminate the combinations (attributes) created in prestashop and create them directly from the new module.
But, I can not eliminate that they are in prestashop, because they are created by a dropshipping provider and they manage the stock every day by color attribute.
I have hidden the attributes created by the prestashop. (They can not be seen on the products page). So far so good.
I create the attributes in the new module.
But the problem comes, when adding a product to buy, to the shopping cart; My client selects the attributes and combinations of color created by the new module, but when adding to the cart two colors are added (the one that comes by default in prestashop) and the one of the new module.
I can not eliminate the combinations created by the dropshipping provider because I can not stop using the stock.
But I need the other module to create another series of combinations (sale by meters boxes) that prestashop does not do.
Question? I can in some way disable the prestashop default combination and not add it to the shopping cart.
Thanks for your help, forgive English (I'm using google translator)
I would advise you to modify the update of your Dropshipping to arrive in your module (at least at the stock level).
Or make a script that once the vendor stocks the products in the shop, make a transfer of quantities in the other declinations, and then remove that from PS.
We are used to this kind of case, being a dropshipping specialist.
Regards,
**forgive English (I'm using google translator)*

How to make some products available only for premium users

In my Sylius shop, I would like to make some products available only for my website premium users.
I managed to set up a promotion rule for premium users, according to the documentation : How to add a custom promotion rule?
My problem is that I can't figure out how to create a promotion action, making selected products available only to premium users. And these products need also to be seen by standard customers.
Is a promotion action a good way to achieve this purpose ?
I don't know if promotions are the best you can use in this feature. There is no discount/profit for the customer, it's just a limitation of product for specific customer group. I would solve this with two simple steps:
Add $premium flag on Product entity.
Implement a listener (or even better - a validator) that would check the currently logged in customer groups and if there is no premium, then break adding product to cart and display proper message.
Of course, you could create a promotion action that would remove products from cart that customer can't buy, but let's be honest, it'd be ridiculous ;)
Let me know if it's clear or you need any more help with that!

What`s the best practice for Magento to update stock from code

I have to integrate my webshop with an external system. This system provides several functionalities, described in their API. This is what I want to do:
Import/sync products (this is available as CSV via request)
Update stock of products (also available as webrequest)
So I have to hook into the Magento stock check and I want some script which updates the products like everyday.
Where should I implement my changes? What is the best way to do this? I can imagine Magento already have some API stock functionalities, but can`t seem to find the right documentation.
Thanks in advance!
Firstly you could use the Magento web service via either SOAP and XML-RPC:
http://www.magentocommerce.com/api/soap/introduction.html#Introduction-SOAP
There's an API for updating stock levels:
http://www.magentocommerce.com/api/soap/catalogInventory/cataloginventory_stock_item.update.html
However, this is usually quite slow and can take some time to update large collections of products, in which case you are better going for a solution which uses the Magento object model directly, or something custom.
Depending upon your level of development expertise there's a few options available. One library to checkout is Magmi:
http://sourceforge.net/apps/mediawiki/magmi/index.php?title=Magmi_Wiki
this is useful for updating lots of product data / stock levels quite quickly.
If you do no require an automated solution, you could always use the standard Magento import/export profiles to import stock levels from a CSV file, a quick search for 'Magento Import Export Profiles' should give you a good starting place:
http://www.seenbest-web-design.com/techclub/importing-a-csv-of-products-to-magento/
http://www.woolleydesign.net/2011/02/updating-store-inventory-in-magento/
I am fully functionally using Magmi now. I have written a plugin to automatically create configurable products, so if anyone is ever interested let me know.
There is already a plugin to process configurable products, my plugin is dependent on that plugin.
Basically, you will only be able to create configurable products if you especially have added this to your CSV, with a column named 'type'. In the column type you can set simple or configurable. With my module that won`t be nessecary. By some logic I automatically recognize the simple products and create a new configurable containing those products.
A little explanation on why I need this:
The stock system of our client updates a list of product (CSV) every few hours, containing entries of products. They sell clothing, and every size, and every color is a new entry. So one product can have 10 entries, entry 1: t-shirt green, size 12; entry 2: t-shirt green, size 13, etc.
I explain this, just in case anybody would ever need something like this, my plugin will probably help you. It will although need a few modification for your situation, since this is very specific to how your list of products is composed.
Anyway, thanks for your help!

Disadvantage of customer sharing in PrestaShop 1.5

I am thinking of modifying the authorization feature of Prestashop, wherein multiple shops can share customers even when shops are not within the same group. For example, when a customer logs in the default shop, after checking out his cart he can go to the next shop without the need to relogin again. More convenient for the customers, I think.
My question is, will that pose any security threat or any other disadvantage to my shops and to my customers? As of now I can't think of any, but I want to know the point of view of PS experts first before I dive into the codes.
And btw, if I am to start editing my shop, is there any method that I can use so that I dont need to edit the core codes?
Use prestashop's override if you really need to change core
http://doc.prestashop.com/display/PS15/Overriding+default+behaviors