1

(10 replies, posted in Juicebox-Pro Support)

Steven,

I've been able to implement 90% of a modal shopping cart. One last issue is holding me up. I used your code above as a guideline, however I'm unable to avoid the default click behavior on the fotomoto shopping cart element.  It seems like $(".jb.bb.btn.fotomoto").off("click") should prevent the default behavior, but no matter what I've tried so far I still get both actions, (my modal shopping cart, and a new page opening).  My code is below:

<!DOCTYPE html>
<html lang="en">
<head>
    <title>Gallery Title</title>
    <meta charset="utf-8" />
    <meta name="viewport" id="jb-viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1, maximum-scale=1, user-scalable=0" />
    <meta name="description" content="" />

    <!-- START OPEN GRAPH TAGS-->
    <meta property="og:title" content="Gallery Title" />
    <meta property="og:type" content="website" />
    <meta property="og:url" content="" />
    <meta property="og:image" content="" />
    <meta property="og:description" content="" />
    <!-- END OPEN GRAPH TAGS-->

    <style type="text/css">
    body {
        margin: 0px;
    }

    
    </style>
</head>

<div id="shoppingcart-container" ></div>
<!--START JUICEBOX EMBED-->
<script src="../ClientGalleries/JD_Kilbride_winter2016/jbcore/juicebox.js"></script>
<script type="text/javascript">

    var purchaseURL;

    var strWindowName = 'Shopping Cart';
    var strWindowFeatures = 'menubar=yes,location=yes,resizable=yes,scrollbars=yes,status=yes,width=600,height=400';

    var jb = new juicebox({
        baseURL: '../ClientGalleries/JD_Kilbride_winter2016/',
        containerId: "juicebox-container",
        galleryWidth: "100%",
        galleryHeight: "100%",
        backgroundColor: "#222222"
    });

    jb.onInitComplete = function() {

      
        $('.jb-bb-btn-fotomoto').off('click');
        $('.jb-bb-btn-fotomoto').click(function(event) {
            

//            var windowObjectReference = window.open('about:blank', strWindowName, strWindowFeatures);
            $.get('../ClientGalleries/JD_Kilbride_winter2016/config.xml', function(data) {
                var index = jb.getImageIndex();
                purchaseURL = $(data).find('image').eq(index - 1).attr('purchaseURL');
//                alert(data);
            }).done(function() {
//                windowObjectReference.location.replace(purchaseURL);

                $("#shoppingcart-container").load(purchaseURL);
                $("#modalShoppingCart").modal('show');
            }).fail(function() {
//                windowObjectReference.close();
                alert("Failed")
            });
        });
    };

</script>
<div id="juicebox-container"></div>

<!--END JUICEBOX EMBED-->

</html>

2

(10 replies, posted in Juicebox-Pro Support)

Thanks. If I succeed in getting the custom shopping cart to work in a modal window, I'll post back to the thread in case anyone is interested in doing something similar.

3

(10 replies, posted in Juicebox-Pro Support)

Steven,

I'm finally getting around to working on this portion of the shopping cart system. I'm pretty sure I understand how your code sample is working.  Is there a template file I can modify so that my galleries are built with the modifed code included, or will I have to hand modify each gallery after it's built?

Thanks

4

(495 replies, posted in Juicebox-Pro Support)

Not sure if this is on this list or not, but the ability to create purchase URLs for all images using a combination of variables.  $imageName, $GalleryName, etc.  I'm currently using a custom PHP function to build the purchaseURLS after gallery creation.

5

(10 replies, posted in Juicebox-Pro Support)

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&amp;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);
}
?>

6

(5 replies, posted in Juicebox-Pro Support)

I'm a part-time photographer, and I'm looking to upgrade the galleries I use for delivering online proofing and ordering.  I see that the Pro version of Juicebox offers integration with FotoMoto, however, I currently self-fulfill all my print orders.  I'm happy with my lab and I would like to keep that business model.  Is there a way to have a shopping cart function within Juicebox that only creates orders but doesn't attempt to process payment, or provide 3rd party print services? 

I love everything else about Juicebox and it would allow me to move away from my current flash based gallery system. 

Is anyone else using Juicebox in a similar fashion to what I describe.

FYI.  I'm trying to avoid paying monthly fees or commisions on order processing, since I only do a few paying jobs a year, however, do lots of family portraits and still need a better way for family members to create print orders than making a list of filenames and print sizes/amounts.

Thanks

Sean