How to direct clicks based on the original click and then a selection - html

Im failing to find the correct terms for what I'm looking to do. I'm not a coder but I can get it done If I get pointed in the correct direction.
I have a network of sites. A main website, a blog, and 3 different woocom stores (international legal reasons all 3 need to be completely separated) I need to be able post a link to a product,let's say "www.--.com/product-x", on the main site the blog or a stand alone link in maybe a Facebook post. Once a potential customer clicks on that link I want them to be sent to a region select page of which there are 3 options. But I don't want them to just be sent to the landing for the woocom store of there selection I want them to be sent to "na.--.com/product-x" or "eu.--.com/product-x"
If it were just 4 or 5 products I would just duplicate the region select page but this isn't realistic. I'd like to compile the "/product-x" part of the URL from where they clicked from,and the "na." And "eu." Part of the URL from there selection.
I'm willing to do some possibly cumbersome .htaccess upkeep or add the pathways individually each time a new product link gets made of that keeps things simpler but aibjust don't want 100 region select pages.
I am aware of Geo-redirects but I'm just not there yet. I for the world can not type the correct thing into Google to find any help on this, and it's not conceivable to me that this is an original idea.
What is this called?

Related

How do I keep a user from double clicking a link in an email?

When users request a password reset, they get an email with a link to generate a password reset code. This link is valid for 24 hours and can be re-used within the 24 hours to generate a new code if the first is lost or forgotten. When users double click the link, two codes are getting generated, leading to user confusion about which to use (the second code invalidates the first code with the way it has been developed).
Since the link in the email is just an html a tag, I'm not sure how I can keep users from double clicking the link.
This sounds like you're facing the XY problem. Your actual issue is that users get confused by visits in a quick succession causing a code that was just generated to be invalid, rather than the fact that the link can be clicked twice.
From a security point of view, these kind of links should really be single-use, and the user should request a new e-mail if they want to perform the action again. Assuming this is something you're forced to do, I believe the best compromise would be to limit code generation to a time frame, so visits within, let's say, 5-10 seconds would result in the same code being shown to the user, based on the server's time.
Implementing any CSS based solution for this that'd work across every e-mail client out there is challenging enough (if at all possible), and I doubt any self-respecting e-mail client is going to let you run any sort of JavaScript to intercept the event.
The following works in a modern browser on an actual web page, but this is not just a bad idea, it's also probably not going to work if you try to use it in an e-mail. I'm providing it here just for the sake of completeness, showing that it's somewhat possible, but please do not rely on this to fix the underlying issue.
<style>a:focus { pointer-events: none }</style>
<p>This is some text, here's a link you can't double click by the way.</p>

Getting a specific text from a website using Regex in Shortcuts

I’m trying to create a Shortcut on iOS that uses Regex, what I’m trying to accomplish is getting the price of a product from a website but no matter what Regex commands I use don’t work. It would be easier if my computer was up and running and I was able to use addons to view the site better but I’m stuck on iOS for the time being. Viewing the source code line 606 displays
'productPrice':'409.99',
But nothing I try pulls the the price even from different lines in the code.
I’m trying to get the price from https://www.microcenter.com/product/512484/intel-core-i7-9700k-coffee-lake-36-ghz-lga-1151-boxed-processor
I just can’t figure out how to retrieve the price being shown, I’ve tried so many combinations I had to turn to more experienced user help.
this works for me: 'productPrice':'(.*?)', - link
Make sure you are getting the part of the page source that contains this information.
The answer was so simple, if using shortcuts on iOS I was able to pull the price of the MicroCenter product by these commands.
URL - microcenter page to product
Get Contents of URL (leave as is)
Get Text from Input
Match Text - Pattern - \$......
Get item from list - Item at Index / 2 (2 is for items on sale or not)
The rest you can decide what to do with it, make a notification or whatever you decide how to display the price. This answer I found was a way to make sure it works. Now I’ll make a menu of multiple items from micro I have my eye on to pull all the prices in 1 click display. https://m.imgur.com/Iljvsx6

ColdFusion Cookie/Form Submission Loophole

Okay so here is my problem. I have developed a framework which does the following:
If, for example, you have four webpages... but you only want to allow users to reach the "4th" webpage after progressing through pages 1-3 sequentially - I have built this functionality (basically I set an encrypted cookie keeping track of what the user has completed thus allowing to know what they should be able to access). There are two parts of it:
1) If a page does NOT have a quiz, the user must only visit the webpages sequentially to be allowed to view the 4th page in the "progression".
2) However, if a page has a quiz on it, the user must successfully pass the quiz to go on to the next sequential page.
Now... Here is the real biggie... The last page will often be a web form which, obviously, I only want an individual to fill out and submit if they have reached the form by sequentially getting to that last page in the progression... BUT I found a flaw in the system. If someone were to go completely through the progression and fill the form out... they could delete their browser's "form data" and go "back" to the form and allow a friend to fill the form out. That would be detrimental to the system, and the users who will be navigating this progression are GOING to look for ways to get around going through it.
Some of the suggestions I will probably get will not be possible given the larger framework I am in, but rather than list all of the impossibilities I would like to see what you guys thought would be a way of getting around this issue?
P.S. This functionality is built in HTML and ColdFusion.
Thank you for any feedback, it is a great help!
EDIT:
Keep in mind the user must be able to back track any previous page they already completed.

Hold data for list to add later?

So no SQL tables or anything here. Basically, I have 3 pages that have 6 items each. Each item consists of an image and then some text and also a smaller image than changes from a check to an "x" depending on if user selects or not. So if the image is checked, the user is adding that to a list which would display on a fourth page. This data needs to persist through just a session and if the session times out, then it resets. If the list is complete and on that fourth page the user choices to email or share list via social sharing, then the data would be gone after that action. What I am trying to figure out is the best way to approach and implement this with minimal time and effort as it has to go out quickly. Can any of you explain and maybe point to some links with info on the best way to achieve?
This is being done in asp.net web forms with html, css, and javascript.
Much appreciated!
You can use ViewBag() (for view in razor) or ViewData[] (for page in .net) to hold data for one web page.when you want it to other page. You can pass it to other page.
check this out
ViewBag, ViewData and TempData

Forcing popup when coming from external websites (e.g google)

I work for a restaurant guide in the NW of the UK and we basically have featured restaurants (the ones who pay a monthly sub) and non-featured restaurants (the ones who get a basic free listing).
We were looking to get some kind of popup appearing on the non-featured restaurants, but only if they came from an external site, e.g Google.
So the steps would be:
1) User goes to google and puts in "name of unfeatured restaurant"
2) Our company comes up with the basic listing of that restaurant
3) User clicks the link but is then presented with a popup of featured restaurants
But, we would only need the popup to appear if the user has come from an external site. So if they were they came internally from our website the popup wouldn't show.
We use ASP at work and I was thinking it may possibly need some kind of a variable being passed through, or maybe something to do with cookies but I'm not an expert on the ASP side.
Hope someone can help on this :)
To see where a user came from you can try:
<%=Request.ServerVariables("HTTP_Referer")%>
This would contain the referring URL. if you want to use it on subsequent pages, you'll have to store it ofcourse in a cookie or session variable.