A
A
Alexey Ivanov2016-01-30 19:42:08
PHP
Alexey Ivanov, 2016-01-30 19:42:08

Who knows how to make such a thing on a site in PHP and MySql?

Hello. I want to ask for help from people who understand this a lot. How many times I tried to do it, I can’t do it, if someone helps me to do it or does it, I will be very grateful. You may ask after reading this, what kind of nonsense is this? just do not ask why I need this on the site.

Here's what I need to do:
--
I have 4 pages on my site. Initially, all users are registered on the site.
My site is an online store.
On the first page there is a product and when you click on the "Add to cart" button, a new browser window opens in which page 2 of the site is loaded.
On the second page of the site, which is opened in a new window, there is a link when clicked on which opens the third page in the same window.
On the third page there is a link, when clicked on, this window closes and the fourth page is loaded in the main browser window and a notification that his order has been accepted.
If the user decides to order another product, it will be the same but no more than 2 purchases per day. after the second purchase, the user will have a time counter "In 24 hours 59 minutes 59 seconds" which will go back.
--
This is what the user should see on the site.
And what should happen in the code itself during these actions:
When you click on the "Add to Cart" button, a new window appears. When the window is closed, the product will not be added to the cart. If the user does not follow all the instructions written above, the product will not be added to the cart until it is exactly as it should be (that is, click on the button and follow 3 links) will not follow the instructions. After he clicks on a link on the third page, a code will run that will check that he has followed all the links and stayed on each for more than 30 seconds. If this is true, then it will check if the user has made more than 2 purchases today. If not, then put the product in the basket. If he did not follow the instructions to follow the links, then nothing happens, he just returns to 1 page. If he ordered more than 2 products in the last 24 hours, then he will get a window on 1 page with a counter how much is left to wait.
I think it's better to do it with PHP and SQL, but I don't know how to do it better. this is a complete zero.
I hope I explained clearly. If someone can help, the truth will help a lot. Thanks in advance.
I use Wordpress and the woocommerce plugin, tell me how to insert it there better

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
nozzy, 2016-01-31
@nozzy

This is a complete scribe, I am personally shocked.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question