V
V
Vasily Belyaev2016-08-10 15:35:59
CMS
Vasily Belyaev, 2016-08-10 15:35:59

How to make random buttons on the site that change their position when the page is refreshed or a new visit?

Hello!
There is a site akimow.com On the page of any product there is a button "Buy".
When you click this button, a page opens where there are 4 buttons to go to the partners' online stores.
396ee6e20f754f48a4b9035c36c6350b.jpg
These buttons are arranged randomly every time, and in such a way that each of the stores appears in each position approximately the same number of times during the month (in order to avoid conflicts with the administration of partner stores, that is, not a single store has priority, it sometimes in the first place, sometimes in the last)
The page is generated in such a way that when you click on the button with the name of the partner store, we immediately go to the page of a specific product in this store.
How is all this implemented now? How can this be implemented on Bitrix, for example, or on another CMS.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
Alexander Aksentiev, 2016-08-10
@Sanasol

How is all this implemented now? How can this be implemented on Bitrix, for example, or on another CMS.

looks like you need to swear...

M
maaGames, 2016-08-10
@maaGames

From the banal:
In a file or database, you start a list of five numbers: 1 2 3 4 5. Each number corresponds to a store. With each request to the page, this list is cyclically scrolled. Everything.
If you don't feel like scrolling, you can shuffle it every time you open it.

M
mletov, 2016-08-10
@mletov

You have to write code in php. For a programmer with minimal experience, the task is quite simple, so it is unlikely that anyone will arrange such garbage as a separate module for reusable use. Or start learning php, or contact freelancers.

M
Mr Hobot, 2016-08-10
@vashaaa

Even a lot. On js, you can just randomly change positions. Or whatever the hell not to do, just change the link and the name. In json we save the name: link. So we prescribe your 5 sites. And when entering the site, we look at which site fell out of 5, put it in first place, and add the rest.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question