NextGEN Gallery ColorBoxer
[resolved] Adding additional content (4 posts)

  1. srailsback
    Posted 3 years ago #

    My client is using this plugin and loves it. He would like to add an link the image to his shopping cart. I've scanned the code but an not seeing where I can insert this.


  2. Mark Jeldi
    Plugin Author

    Posted 3 years ago #

    Hi srailsback,

    I'm glad to hear your client's enjoying the plugin!

    It sounds as though you're looking to add a "Buy Now" link in the ColorBox lightbox's description text, which points to a specific sales page for the item. Is this correct?

    If so, you can simply add the link HTML directly into NextGEN Gallery's "Description" field for each image at Gallery --> Manage Gallery --> your_gallery_name.

    For example:
    My awesome painting | <a href="http://www.mysite.com/store/my-awesome-painting/" style="color: red;">Buy Now!</a>

    Hope this helps!


  3. srailsback
    Posted 3 years ago #

    Thanks Mark for the tip - unfortunately it was not as simple as you described. Client wanted the buy now link in #cboxBottomCenter and also did not want to have to build a project page for each item (he has thousands). In the end I rolled a little js to get the desired outcome:

    jQuery(document).bind('cbox_complete', function(){
    	// get the title
    	var t = jQuery('#cboxTitle').text();	
    	// split it
    	var arr = t.split(' ');
    	var imageId = arr[0].replace('#','');
    	jQuery('#cboxBottomCenter').append("<a class='cbox-add-to-cart' style='float:left' margin-top: -10px;' href='cart/?image="+imageId+"'>Purchase Print</a>");

    Thankfully he includes the product id on all product titles. I wrote a custom page template that handles the incoming request and displays the product and cart stuff.

  4. Mark Jeldi
    Plugin Author

    Posted 3 years ago #

    Hey srailsback,

    No worries. And thanks for sharing your custom solution! That's very clever! :)


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • NextGEN Gallery ColorBoxer
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.