S
S
Sergey2014-11-13 06:04:55
PHP
Sergey, 2014-11-13 06:04:55

Why does the ability to add to cart in Bitrix fall off?

The site has two mini-baskets that show the number of goods and the amount, when you hover over either, a short list of goods that are in the basket drops out. There are two such elements, in the footer and in the header, but they differ slightly in layout.
I display them as a basket component, only with different templates.
I took the template and component call from the main basket. And I copied the template, removing the excess, adding my own (well, maybe this is important, xs).
And what is the essence of it:
If you make two mini baskets at once, then it becomes impossible to add goods to the basket. I add everything just ajax link, for example, this: /catalog/product/index.php?action=BUY&id=33002
And if one of the baskets is disabled, then everything is ok. If two - is not added. The request goes away and the cart doesn't care. At the same time, both baskets show what you need, they work without problems, only the addition falls off.
The problem is definitely not in Ajax, because by manually driving the link into the browser - there is no result.
Can you suggest what could be the reason? Can you advise something?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
R
Roman Frank, 2014-11-13
@Akellacom

I would advise you not to use this piece of shit called Bitrix :)

R
Rad1calDreamer, 2014-11-13
@Rad1calDreamer

I can’t say what the reason is, it’s better for you to ask a question on the Bitrix forum.
And you can solve the problem by replacing one of the baskets with your component (the list of goods, the amount and quantity can be obtained very easily)

K
kompi, 2014-11-13
@kompi

Write your own components/modules that can be reused later. Fitting into some of their standard components is sadomasochism.

T
Tashiro, 2014-11-14
@Tashiro

due to the fact that from version 12 (in my opinion) in the Bitrix basket component, they moved the package of functions to an external file and at the top make it include () (without _once) because of this, two identical basket components on the same page will not live normally.
if you need it so much both at the top and at the bottom, use normal ajax and not the one that Bitrix gives.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question