Welcome back.
Now, what they need to do is that they need to take the user through this single product page whenever
they click on Buy now.
So, for example, if the user is interested in buying this bag, then they would click on buy now and
while clicking on Buy Now we want to take them to the single product page where we will display only
that specific product and more information about that product.
And from there, they can add it to CART.
So first, the first step is that we need to convert the single product page into page.
So I'm going to here rename this file and then I'm going to see single product dot BHP.
So the file is no longer an email file.
So now this single product that BHP is and it is obviously an HD is obviously a B2B file.
The second step is that we need to add link to the button.
So this button, I'm going to add a tag and I'm going to surround it with eight.
I'm going to surround it with eight.
So I'm going to copy the attack.
I'm going to copy the the button.
And then I'm going to exit inside the attack.
And then I'm going to give this attack a try.
I'm going to say it.
So the ref is going to be equal to single.
Single.
Underscore.
Product.
Products.
That beautiful lady save and leaning head on over to the Rousing Illini.
Click on one of these button.
So if you click on Buy Button, it should take me to the single product.
But if I click on the second product, it's going to take me to the same exact page and it's going to
display another it's going to display the first product and if it click on the third.
The third product is going to take me to the same page and is going to display the first product.
And obviously this is not dynamic because we are displaying now a static code.
So we need to make the process dynamic and then we need to display the correct product.
If we click on buy now, so how can we do that?
To do that, we need to say we need to say in the entries, we need to add to your question mark and
then product product ID.
Underscore I.D. is equal to.
And then we need to get that I.D. from each piece.
I'm going to say here, each p.
And then I'm going to say Echo and then I'm going to say product, rah rah and then product lady.
Products.
Many was this?
Product underscore and then semicolon.
So where did they get this product?
Where do they get this draw from?
This is obviously from this loop and product.
It is the idea of the product because if you check the database one more time, you will find that the
the product stable.
If you go to the product label, you should find that it is the colon for the it is is a product and
their score.
So again, if I go to the products table, we have product underscore I.D. so we can use this product
and you can instead of doing this, which is a little tricky, you can actually copy this and remove
it from here and then you can add it in the echo.
So you can add it to your echo.
And here.
Double cross and then your double cross and then dot, dot and then draw product.
This is also going to work.
So there are two versions you can use.
The first version that they have showing you or this version.
Let me sleep and let me test.
So this should take you this should take you again to the.
Do they product to the product.
To the single product page that I'm going to click on buy now and it's going to take me to the product
page.
But now guess what?
Now in the browser we have here the product ID in the you are l.
So why did they pass the product?
The reason is because by bypassing the product ID, they will be able to get the correct product information
and display the product here.
So if I click on the second product, they should get product that is equal to two.
If I click on the third product, it's going to say here product area is equal to three.
So now it worked.
And the next step is that we need to use this product ID to get the product information and display
display product information and instead of displaying the static site.