Custom Page

Hi, Goodmorning everyone!

I would like to know if it is possible to create a custom page and insert items manually (Cs-cart V 4.3.10)

Suppose for example, a page with discounted items, or free delivery, or eco friendly items, etc... In other words, items randomly chosen from any category of the shop and inserted in this page.

Obviously the page should be linkable.

Thanks for your help.

Simon

I do not know you developer experience but I am assuming you know some basics :)

Please follow:

1. Create a new category named "Custom category" and will have category_id=77

2. Add a new php hook for get_products_pre, in my example i use my_changes add-on

fn_set_hook('get_products_pre', $params, $items_per_page, $lang_code);

ex:

function fn_my_changes_get_products_pre(&$params, $items_per_page, $lang_code){
    if(AREA=='C' && !empty($params['cid']) && $params['cid']==77){
        //list my dynamic products
        $product_ids = [];
        //add to array all ids that you need to list
    //get products needed
    $params['pid'] = $product_ids;
}

}

Please let me know if you have any questions.

Hi, Goodmorning everyone!

I would like to know if it is possible to create a custom page and insert items manually (Cs-cart V 4.3.10)

Suppose for example, a page with discounted items, or free delivery, or eco friendly items, etc... In other words, items randomly chosen from any category of the shop and inserted in this page.

Obviously the page should be linkable.

Thanks for your help.

Simon

You can create CMS pages and add blocks with products to these pages only. For example,

- create "eco friendly items" CMS page

- go to Design -> Layouts -> Pages page

- create new products block with the manually filling

- set global status of this block to Disabled

- go to block settings and specify "eco friendly items" page in the Status tab

As a result new block will be displayed for the "eco friendly items" page only

HI,

thank you all for the support. I will try the solutions.

Simon