Copying using the I want this too link fails to copy the item but does deliver the success alert.
I changed the code in shop.php inside the "copy" action to:
if ($row = $stmt->fetch()) { $desc = $row["description"]; $source = $row["source"]; $url = $row["url"]; $comment = $row["comment"]; $price = $row["price"]; $cat = $row["category"]; $ranking = 1; $quantity = 1; $image_filename = ""; $stmt = $smarty->dbh()->prepare("INSERT INTO {$opt["table_prefix"]}items(userid,description,price,source,ranking,url,category,comment,quantity,image_filename) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"); $stmt->bindParam(1, $userid, PDO::PARAM_INT); $stmt->bindParam(2, $desc, PDO::PARAM_STR); $stmt->bindParam(3, $price); $stmt->bindParam(4, $source, PDO::PARAM_STR); $stmt->bindParam(6, $url, PDO::PARAM_STR); $stmt->bindParam(8, $comment, PDO::PARAM_STR); $stmt->bindParam(7, $cat, PDO::PARAM_INT); $stmt->bindParam(5, $ranking, PDO::PARAM_INT); $stmt->bindParam(9, $quantity, PDO::PARAM_INT); $stmt->bindParam(10, $image_filename, PDO::PARAM_STR); $stmt->execute(); stampUser($userid, $smarty->dbh(), $smarty->opt()); $message = "Added '" . $desc . "' to your gift list."; }
and it now works.
Thanks Rod, I'll look at merging this in.
It will be on GitHub though, not here. Perhaps you'd like to put up a pull request?
Log in to post a comment.
Copying using the I want this too link fails to copy the item but does deliver the success alert.
I changed the code in shop.php inside the "copy" action to:
and it now works.
Thanks Rod, I'll look at merging this in.
It will be on GitHub though, not here. Perhaps you'd like to put up a pull request?