WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. srailsback
    Member
    Posted 1 year 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.

    http://wordpress.org/extend/plugins/nextgen-gallery-colorboxer/

  2. Mark Jeldi
    Member
    Plugin Author

    Posted 1 year 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!

    Cheers,
    Mark.

  3. srailsback
    Member
    Posted 1 year 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
    Member
    Plugin Author

    Posted 1 year ago #

    Hey srailsback,

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

    Cheers,
    Mark.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.