I have added a button to buy all images in the gallery. I created a physical image as a dummy. When button clicked, the product is added to cart. No Problem so far.
BUT - after completing the checkout either customer nor I get an E-Mail notifying this buy.
But what’s worst: When I check in Cart module → orders: I can not see which this “all images” belongs to. Background: We have hundreds of albums like 001,002,003,… Each belong to a different kindergarten. So how do I know which album was bought. I can not see any info in orders
Any idea?
Why are we doing this? Well, BL has no built in feature for our customers to buy all digital images. That’s why I added this dummy. After the customer ordered the whole gallery, we send him/her a download link.
If you don’t want to create a Buy All product for each album. (e.g. “Buy All album xxx”) and pricing schemes for each, you could try adding a field to the checkout (cart > settings > Additional Fields) and name it something like “Album name for Buy All purchases”
It would then be up to your customers to enter the name of the album in that field when checking out.
That I also thought about. Will have a look if this is working. Could create it as “required” field
And what about mails not sent when only this product is checked out? All other checkouts with “normal” products physical as well as virtual is working fine
Maybe something like this? This goes into your Pangolin phplugins file. It adds the buy button to all of your Kunden Galerien. Set data-item according to your cart settings. data-name contains the album title. Hopefully, it will appear in your invoice.
Vielleicht funktioniert es ja auch. Viel Glück!
// returns true if $page matches current page or any of its sub-pages
function dlp_page_match($page) {
if (substr($_SERVER["REQUEST_URI"], 0, strlen($page)) == $page) {
return true;
} else {
return false;
}
}
function album_top(){
// add buy button to kunden-galerien album pages
if ($this->dlp_page_match('/galleries/kunden-galerien/')){
$album = $this->album;
$album_title = $album->getTitle();
// add buy button
echo '<p><button class="add-to-cart" data-item="item-code" data-name="'.$album_title.'" data-price="25">Alle Kaufen</button><br><br></p>';
}
return true;
}