E
E
e-hot2018-10-23 08:35:20
1C-Bitrix
e-hot, 2018-10-23 08:35:20

In which component and how is the arResult['BACKURL'] value formed in Bitrix?

Greetings.
Need help with the following situation.
1. DESCRIPTION OF THE SITUATION. There is a store on Bitrix (I know this cms-ku badly). In the basket, when the page with the selected products opens, there is a link: the task was set - to set up this link so that the transition is made back to the last page of the catalog (so that the client goes to where he came from the catalog) I searched the internet for solutions, found this:
<a class="back" href="/">Продолжить покупки</a>

<a class="back" href="<?=$arResult["BACK_URL"]?>">Продолжить покупки</a>

everything seems to work, but the problem is that the system considers and saves the url of the cart itself in $arResult["BACK_URL"] as the last visited url, i.e. $arResult["BACK_URL"] = 'personal/cart/' and of course returns the cart page - that's not gut
2. QUESTION. Which component in Bitrix (or not a component):
A) generally captures the current url
B) stores the current url in $arResult["BACK_URL"]
I need this to do the following: when opening the cart page ( 'personal/cart/' ) identify its url, and if url = 'personal/cart/', then don't store the received value in $arResult["BACK_URL"], i.e. do not overwrite the previous url value,or all this in other words: to intercept an unnecessary url and not overwrite the required url already in $arResult["BACK_URL"] with it.
Note: There are currently no files in the cart component, such as description.php, component.php
Thank you.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
J
Jupiter Max, 2018-10-23
@e-hot

read it here , looks like it might work

S
Sergey Ivanov, 2015-08-17
@Writerim

As far as I remember data is just an html response, not an object.

A
Alexander X, 2015-08-18
@san-x

1. Does the response come in xml or json?
2. responseText and message - what is it? such an element in the response?
3. in general, can you see the answer, how does it come from the backend?
offhand, if the answer is something like this:

<xml>
<message>Отлично, теперь мы вас заспамим!</message>
</xml>

... then it should be something like this:
$.ajax({
      url:'/signup/checkusername',
      type:'POST',
      dataType: 'xml',
      data:{
        email:email
      },
      success:function(data){ alert($(data).find("message").text()); }
    });

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question