However, I'm not sure how Juicebox is processing the PurchaseURL tag or how it could be formatted to allow this type of functionality.
As far as I am aware, Juicebox takes the purchaseURL and uses the JavaScript window.open function to open the URL in a new ('_blank') tab.
Unfortunately, this functionality is hard-coded within the 'juicebox.js' file which is packed and obfuscated and cannot be modified.
The only way I can think of to open a purchaseURL as a modal popup would be to override Juicebox's own handling of the Shopping Cart icon. (You are welcome to try this but please note that such modifications are not officially supported.)
You could then run some custom JavaScript code (to open a modal popup) when the Shopping Cart icon is clicked.
Unfortunately, it is not currently possible to fetch an image's purchaseURL from the gallery's configuration file using the Juicebox-Pro API getImageInfo() method (I have notified the developers of this) but you could parse the file yourself and extract the required purchaseURL manually.
Here's some sample code that should hopefully point you in the right direction and serve as a starting point.
<!--START JUICEBOX EMBED-->
<script src="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({
containerId: "juicebox-container",
galleryWidth: "100%",
galleryHeight: "100%",
backgroundColor: "#222222"
});
jb.onInitComplete = function() {
$('.jb-bb-btn-fotomoto').off('click');
$('.jb-bb-btn-fotomoto').click(function() {
var windowObjectReference = window.open('about:blank', strWindowName, strWindowFeatures);
$.get('config.xml', function(data) {
var index = jb.getImageIndex();
purchaseURL = $(data).find('image').eq(index - 1).attr('purchaseURL');
}).done(function() {
windowObjectReference.location.replace(purchaseURL);
}).fail(function() {
windowObjectReference.close();
});
});
};
</script>
<div id="juicebox-container"></div>
<!--END JUICEBOX EMBED-->