Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to fetch the details of items in the next page checkout.php #314

Open
sammy101740 opened this issue Jun 9, 2020 · 5 comments
Open

Comments

@sammy101740
Copy link

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?

@11JoseMarcos11
Copy link

Hello, Sammy. I have the same problem. Did you manage to solve?

@sammy101740
Copy link
Author

sammy101740 commented Jul 16, 2020 via email

@11JoseMarcos11
Copy link

11JoseMarcos11 commented Jul 17, 2020

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.

@ghost
Copy link

ghost commented Feb 24, 2021

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

@11JoseMarcos11
Copy link

You can also try this way:

foreach ($_POST as $key => $value)
{
     echo "Field ".htmlspecialchars($key)." is ".htmlspecialchars($value)."<br>";
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants