Open sammy101740 opened 4 years ago
Hello, Sammy. I have the same problem. Did you manage to solve?
No my problem is not solved.
On Wed, 15 Jul, 2020, 9:52 pm José Marcos, notifications@github.com wrote:
Hello, Sammy. I have the same problem. Did you manage to solve?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jeffharrell/minicart/issues/314#issuecomment-658861771, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIKTHAYWL2ZMJJ6HD43ZMCTR3XJS3ANCNFSM4NZFE5TA .
I managed to get the names of the products this way: I am using VSCode. In the js / minicart.js file, I went to line 1912 and changed <input type = "hidden" name = "item_name _ <% = idx%>" value = "<% = items [i] .get (" item_name ")% > "/>
for <input type =" hidden "name =" item_name [] "value =" <% = items [i] .get ("item_name")%> "/>
and in PHP I took the values like this::
<?php
$cart = $_POST["item_name"];
for($i = 0; $i < count($cart); $i++)
{
$name = $cart[$i];
echo "Name ".$name.'<br>';
}
?>
See if it works for you. Sorry about my English.
just change action value inside minicart.js to your php page.. that would be solve the problem. Anyway this project is not maintained anymore. I also cannot find the documentation, so u can choose another library for your project if you can
You can also try this way:
foreach ($_POST as $key => $value)
{
echo "Field ".htmlspecialchars($key)." is ".htmlspecialchars($value)."<br>";
}
Please help me in coding. I want to fetch the details of the the cart in the next page checkout.php. How can i do that?