J
J
jenny_sunny2017-09-08 16:42:01
1C-Bitrix
jenny_sunny, 2017-09-08 16:42:01

How to display orders in detail in the user's personal account in 1C Bitrix?

Hello!
You need to display a list of orders and orders in detail in the user's personal account.
There is a sale.personal.order component, which, as I understand it, can be used to do this.
There are 3 files in the sale.personal.order component folder:
- list.php (list of orders)
- detail.php (orders in detail)
- cancel.php (cancellation of an order),
with the help of which the necessary components are connected.
I call the sale.personal.order component in the personal/history-orders/index.php folder.
But what should I specify in the paths? (code below)
"SEF_URL_TEMPLATES" => array(
        "list" => "", // what to put here?
        "detail" => "order_detail.php?ID=#ID#", // what to put here?
        "cancel" => "order_cancel.php?ID=#ID#", // what to put here?
    ),
It's not entirely clear how to open the order page in detail, eg.
If you specify the path "detail" => "order_detail.php?ID=#ID#", you need to create the order_detail.php page in the personal/history-orders/ folder, where does the component call occur? Or will the component create the page?
How are these components called? How does Bitrix determine where to climb and which page to use?
When the component is called, the paths to these 3 files (list.php, detail.php, cancel.php) are not specified.
PS At the moment, the list of orders is displayed, but the orders in detail come out with a 404.php error

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artyom Luchnikov, 2017-09-08
@jenny_sunny

It is enough to place the complex component sale.personal.order and it will process the links itself. No additional php files need to be created. In "list" write "index.php" if the component will be in index.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question