Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore F.A.Q/Instructions › Using Multiple eStore product as the template for NextGen Gallery Integration
- This topic has 5 replies, 2 voices, and was last updated 12 years, 11 months ago by admin.
-
AuthorPosts
-
December 30, 2011 at 7:11 am #5144adminKeymaster
Update: This tweak is no longer needed. You can do this from the eStore nextgen gallery addon’s settings area.
==============
This instruction is an enhancement to the existing NextGen gallery integration option:
http://www.tipsandtricks-hq.com/ecommerce/nextgen-gallery-alternate-integration-method-805
This will add the ability to use more than one eStore product as a template for different NextGen galleries which will allow you to use different price and variations for different galleries:
We are going to achieve the goal (use more than one eStore product as a template for different galleries) by copying the currently used template file and using a different product ID in that copied template file then use it to display the gallery. The following steps will guide you:
Step 1: Lets say you are using the “gallery-wp-eStore-auto.php” template file currently. So make a copy of this file… lets call it the following:
gallery-wp-eStore-auto-2.php
Step 2: We are going to change this newly copied template file to use a different eStore product as the template product. For example, we will assume that the eStore product that we want to use as a template for this one has a product ID of 10 (it will be different in your case). So take note of the product ID that you are going to use as the template product.
Step 3: Open the template file that you copied (gallery-wp-eStore-auto-2.php). Search for the following line of code in this file:
$product_id = get_option('eStore_ngg_template_product_id');
Once you find it change it to the following (10 is the product ID we are using in this example… you will need to use the product ID that you noted in step 2) :
$product_id = "10";
Step 4: Upload this template file to the appropriate NextGen gallery folder (nextgen-gallery/view) so we can use this.
Step 5: Use the following shortcode to display the NextGen Gallery with different template product in a post or page.
[nggallery id=1 template=wp-eStore-auto-2]
The gallery id is 1 in this example. The template name “wp-eStore-auto-2” comes from the template file we created in step 1.
December 30, 2011 at 11:39 am #40153milnerstudiosMemberThanks for the fast reply. However, I followed your steps and duplicated the template, renamed it, and changed the product_id to suit, but estore still draws the variations from the template specified in the 3rd party integration. not sure what has gone wrong
thanks
mike
December 30, 2011 at 11:55 am #40154milnerstudiosMemberactually I can remove the following whole top section of the template
<?php
$product_id = get_option(‘eStore_ngg_template_product_id’);
global $wpdb;
$products_table_name = WP_ESTORE_PRODUCTS_TABLE_NAME;
$ret_product = $wpdb->get_row(“SELECT * FROM $products_table_name WHERE id = ‘$product_id'”, OBJECT);
$product_price = $ret_product->price;
?>
and the template still brings up the variations set in the setting of the 3rd party integration
December 31, 2011 at 4:18 am #40155adminKeymaster1. What did you name this new template file?
2. What NextGen gallery shortcode are you using? Copy and paste the exact shortcode that you are using for this new template file.
3. Post a link to the page where you are using it.
December 31, 2011 at 11:37 am #40156milnerstudiosMember1. What did you name this new template file?
gallery-wp-eStore-auto-addtocart-3.php
2. What NextGen gallery shortcode are you using? Copy and paste the exact shortcode that you are using for this new template file.
[nggallery id=1 template=wp-eStore-auto-addtocart-3]
3. Post a link to the page where you are using it.
January 1, 2012 at 6:09 am #40157adminKeymasterThank you.. I see the issue now. I just updated the plugin so this customization can work. Please download a new build of the plugin from here:
https://support.tipsandtricks-hq.com/update-request
Then use the new template from the “view” directory of this plugin and apply the changes specified above.
-
AuthorPosts
- You must be logged in to reply to this topic.