Topic: Purchase URL as modal popup
Looking for some assistance on a way to get my purchase URL page to appear as a modal popup rather than opening a completely new webpage. Currently I generate a purchase URL for each image which looks like this:
purchaseURL="Cart/ShoppingCart.php?imagename=161210_05124.jpg&galleryname=Gallery Title"
This allows me to pass the image name and Gallery Title to my custom purchase URL which is a PHP page which I'm building as a shopping cart (ShoppingCart.php). However the functionality of this causes the shopping cart to open a completely new browser tab. I was looking for something closer to the functionality offered by the FotoMoto implementation where the ShoppingCart.PHP is opened as a modal window with the existing gallery still visible to avoid a jarring swith between gallery and shopping cart. However, I'm not sure how Juicebox is processing the PurchaseURL tag or how it could be formatted to allow this type of functionality.
I'm actually building the PurchaseURL data programatically from another page although I don't think it impacts this:
<?PHP
$FolderName = $_GET['FolderName'];
$XMLPath = "ClientGalleries/" . $FolderName . "/config.xml";
$xml=simplexml_load_file($XMLPath);
$images = $xml->image;
$xml->addAttribute('folderName','../ClientGalleries/' . $FolderName);
foreach ($images as $image)
{
echo $xml['galleryTitle'] . "<br>";
echo $image['imageURL'] . "<br>";
$imageName = explode("/", $image['imageURL']);
echo $imageName[1] . "<br>";
$PurchaseStr = "../../Cart/ShoppingCart.php" . "?imagename=" . $imageName[1] . "&folderName=" . $FolderName. "&galleryName=" . $XML['galleryTitle'];
echo $PurchaseStr . "<br>";
$image->addAttribute('purchaseURL', $PurchaseStr);
$xml->asXML($XMLPath);
}
?>