Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore Tweaks › Various product ID's – Possible with Nextgen Gallery?
- This topic has 10 replies, 3 voices, and was last updated 13 years, 4 months ago by rickyb.
-
AuthorPosts
-
June 4, 2011 at 10:59 pm #3531timothymichael79Member
It is possible to use 2 or 3 different product ID’s with Nextgen? i.e. one gallery with say a friends pricing for photos and say another gallery with a full price gallery?
June 5, 2011 at 1:53 am #33074amin007ParticipantWhich NextGen gallery integration are you talking about? Please post a link to the integration documentation that you are following.
June 7, 2011 at 4:23 pm #33075timothymichael79MemberThe Alternative method
June 8, 2011 at 2:56 am #33076amin007ParticipantUpdate:
Nope, the alternate method (use one product as a template for every photo) does not have the option to use multiple products multiple gallery.
July 6, 2011 at 1:34 am #33077rickybMemberSure would be nice to have more than just one product for the “alternate” method. What if I created a copy of the template?
July 6, 2011 at 7:50 am #33078amin007ParticipantYes you can make a copy of the template then hardcode a different product ID in that template that you copied.
July 6, 2011 at 3:31 pm #33079rickybMemberCool! I’ll see if I can find the place to hardcode a different product ID. I’ll ask you where if I can’t find it. Thanks!
July 6, 2011 at 3:56 pm #33080rickybMemberIs this the right place in gallery-wp-estore-auto-addtocart.php? I’m copying this file to add another automatic product for another set of images with different sizes and prices.
<!– Thumbnails –>
<?php foreach ($images as $image) : ?>
<div id=”ngg-image-<?php echo $image->pid ?>” class=”ngg-gallery-thumbnail-box” <?php echo $gallery->imagewidth ?> >
I’m thinking I have to replace the “pid” in <php ecoh $image->pid ?> with a product ID that I create in Add/Edit Products.
Am I on track?
July 7, 2011 at 5:46 am #33081amin007ParticipantOkay I have updated eStore so you can do what you are after. So first of all get a new build of eStore from here and update your site:
https://support.tipsandtricks-hq.com/update-request
Now, open the template file that you copied (lets refer to this file as “gallery-wp-estore-auto-addtocart-copied.php”). Search for the following line of code in this file:
<?php echo print_eStore_ngg_add_to_cart($image); ?>
Once you find it change it to the following:
<?php echo print_eStore_ngg_add_to_cart($image,"2"); ?>
Replace 2 with the actual PRODUCT ID number (this the ID of the product that you want to use as the template product from this gallery template).
That should do it. Now, when you embed a gallery using this modified template file it will use the specified product as the template product.
July 7, 2011 at 9:51 pm #33082rickybMemberWow, that is so cool. I must say that I am totally impressed by your responsiveness. Thank you very much. I’m off to give this a whirl. I’ll let you know how it goes.
July 8, 2011 at 12:43 am #33083rickybMemberSeems to work great! Thanks much!
-
AuthorPosts
- You must be logged in to reply to this topic.