Tips and Tricks HQ Forum

Support Forum for Tips and Tricks HQ Products

Register or log in - lost password? (Having an issue with the forum login?)

Search the Forum

Tips and Tricks HQ Forum » WP eStore Forum » WP eStore F.A.Q/Instructions

Using Multiple eStore product as the template for NextGen Gallery Integration

(6 posts) (2 voices)
  • Started 4 months ago by admin
  • Latest reply from admin
  • Possible Solutions (Related Topics):
    1. Integrate NextGen gallery with WP eStore without listing products two times.
    2. Rendering of Template Gallery Failed Error - WP eStore + NextGen Gallery
    3. WP eStore NextGen Gallery Integration - Define a Max Width For Thumbnail Area
    4. WP eStore and NextGen Gallery integration
    5. WP eStore and NextGen Gallery Integration Issue

Tags:

  • multiple eStore product template
  • NextGen Gallery
  1. admin
    Key Master

    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.

    Posted 4 months ago #
  2. milnerstudios
    Member

    Thanks 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

    Posted 4 months ago #
  3. milnerstudios
    Member

    actually 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

    Posted 4 months ago #
  4. admin
    Key Master

    1. 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.

    Posted 4 months ago #
  5. milnerstudios
    Member

    1. 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.

    http://milnerstudios.com/?page_id=4309

    Posted 4 months ago #
  6. admin
    Key Master

    Thank 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:
    http://support.tipsandtricks-hq.com/update-request
    Then use the new template from the "view" directory of this plugin and apply the changes specified above.

    Posted 4 months ago #

RSS feed for this topic

Reply

You must log in to post.

Tips and Tricks HQ  | WP Shopping Cart  | WP Affiliate Software  | WordPress Membership Plugin