Help for integrating the Laravel package
Forum rules: Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
#4779 by Ahmad
14 Oct 2017, 10:38
i want to determine some product as Special Offers with a special and lower prices, customers just can order this
products in a specific and limited time,
I show list of this product is home page as Special Offers.
how can I implement it with aimeos-laravel?
#4798 by aimeos
23 Oct 2017, 11:37
Adds these products to the root category. You can then add a new "home" page (https://github.com/aimeos/aimeos-laravel/blob/master/src/config/shop.php#L16) using "catalog/lists" component. In the action of your controller for the home page, retrieve the list view like here: https://github.com/aimeos/aimeos-laravel/blob/master/src/Aimeos/Shop/Controller/CatalogController.php#L58
#4938 by Ahmad
11 Nov 2017, 22:21
aimeos wrote:Adds these products to the root category. You can then add a new "home" page (https://github.com/aimeos/aimeos-laravel/blob/master/src/config/shop.php#L16) using "catalog/lists" component. In the action of your controller for the home page, retrieve the list view like here: https://github.com/aimeos/aimeos-laravel/blob/master/src/Aimeos/Shop/Controller/CatalogController.php#L58


You did not answer my original question...!
i want to determine some product as Special Offers with a special and lower prices, customers just can order this
products in a specific and limited time,
I show list of this product is home page as Special Offers.

your answer just show products like /list page but in another page...
please if you can help me...do not just give a general answer
#4945 by aimeos
12 Nov 2017, 11:52
If you don't want to use the existing "catalog/lists" component for this, you can retrieve the products using the product controller (https://aimeos.org/api/latest/class-Aimeos.Controller.Frontend.Product.Iface.html) and add the objects to the Blade view. Then, you have to care about the rendering yourself:
Code: Select all$context = $this->app->make('\Aimeos\Shop\Base\Context')->get();
$cntl = \Aimeos\Controller\Frontend\Factory::createController( $context, 'product' );
$filter = $filter->addFilterCategory( $cntl->createFilter(), <catid> );
$items = $cntl->searchItems( $filter, ['text', 'price', 'media'] );
#4949 by Ahmad
12 Nov 2017, 12:52
aimeos wrote:If you don't want to use the existing "catalog/lists" component for this, you can retrieve the products using the product controller (https://aimeos.org/api/latest/class-Aimeos.Controller.Frontend.Product.Iface.html) and add the objects to the Blade view. Then, you have to care about the rendering yourself:
Code: Select all$context = $this->app->make('\Aimeos\Shop\Base\Context')->get();
$cntl = \Aimeos\Controller\Frontend\Factory::createController( $context, 'product' );
$filter = $filter->addFilterCategory( $cntl->createFilter(), <catid> );
$items = $cntl->searchItems( $filter, ['text', 'price', 'media'] );


yes i don't want to use existing "catalog/lists" component but you don't help me about how can set a product special offer for a limited time
I would appreciate if you can read my request again
I will explain with an example:
i create a product with price 100$
now i want to sell this product from January 2nd 2018 to January 7th 2018 with a price 50$ and with a sign(flag) indicating that this product is sold specially
First Question is how What should I do to do this?

after that i want to get list of this marked products as special sales with using the product controller as an array,
Actually, suppose it's January 2nd and I want to get the list of products that are sold specially and show the user

I know I will be bothering you, but thank you for telling me how to do it.
#4959 by aimeos
13 Nov 2017, 15:36
You have to understand that Aimeos isn't working with x flags for this and that.

Instead, you have three options to "mark" product as special:
- Add them to a "sepecial" category (discount, topseller, etc., usually the best option)
- Add a property to that product, e.g. type "special" and value "discount" where you can search for
- Add an attribute with same type/value to that product instead of a property

Iin the last case, your users will automatically be able to filter for these types if you add it to the allowed configuration for faceted search.

For time limited offers, please set the start and end date for that products in the admin interface.