I suppose thats the point. I havent made any changes to my templates in plugins/nextgen-gallery/view. Would you mind to share your files or pluginfolder?
Why Configure Every Product Separately When Used with NextGen Gallery
(99 posts) (14 voices)-
Posted 1 year ago #
-
I too would be interested in your files please.
I have been struggling with this for a week now.
I have been using import and export from SQL to manipulate the data, but you method looks much easier and better.
It would be grealy appreciate if you would provide the files.
Cheers
Pokie
Posted 1 year ago # -
It's been a while, but I'll try to outline the steps. The essence of this (and please keep in mind that I'm not a programmer or proficient at php so I'm going by deduction) is to add a new variable that can be called from the NGG view template with the data you're looking to carry over. In my case, it's the customer input field, normally used for customers to give you special instructions, but that I'm using to auto-populate with the name of the photo from the NG Gallery.
1. Place gallery-wp-estore-addtocart.php in your NG Gallery's plugin 'view' folder.
2. Replace eStore_misc_functions.php and eStore_button_display_helper.php in the wp-cart-for-digital-products (WP eStore) plugin folder.
3. Upload all of your pics to NG Gallery (in a new gallery).
4. Create a new product in WP eStore and check the "Collect Customer Input" option. I don't think you need to enter any text for the label. This just makes it possible to use the field for our purposes. I priced the product (Photo Print) at $0 and then added all of the variations I wanted at their full price (example: PRINTS|4x6:5|5x7:7|Two 5x7:12|8x10:12|11x14:20|12x16:25 etc.)
5. Place shortcode [nggallery id=x template=wp-eStore-addtocart] in your page/post (x is the gallery ID number).If I'm not mistaken, that's it.
Don't forget to set an Add To Cart button link for the WP eStore Settings (Add to Cart button text or Image).
Displaying a gallery with these options should yield something similar to http://camelarae.com/galleries/sloan-canyon-christian-academy as far as functionality goes.
Good luck!
Posted 1 year ago # -
Thanks you so much for taking the time to provide this.
This is the exact solution I was looking for and am surprised it is not built in.
This is perfect for selling hard copy prints of ones pictures.
Thanks again.
Pokie
Posted 1 year ago # -
Strange, I had posted a link to the zip file with the files and now it's gone?
[admin deleted the link]
===== Updated by admin =====
LOL... I kept a backup and deleted that link. Not a very good idea to have links with sourecode :)Nobody will be able to just copy and paste it anyway as those files are constantly changing with newer version of eStore. It's better to just have your step by step guideline which is very complete for any coder to follow.
Posted 1 year ago # -
Got it. The biggest part of the problem, for me at least, was actually understanding how to code it in the first place, but ok!
Posted 1 year ago # -
Hi darkmatter,
I've been pulling my hair out trying to get this to work for the past few days.
I have tried to follow this thread as best I can but I can't for the life of me get anything to display in the custom field.
I have the following:
In template file:
<?php echo get_button_code_for_product(1,$image); ?>eStore_misc_functions.php:
function get_button_code_for_product($id,$image)
function get_button_code_for_element($ret_product,$line_break=true,$ngg2Image='')
$var_output = get_variation_and_input_code($ret_product,$line_break,$ngg2Image);eStore_button_display_helper.php:
function get_variation_and_input_code($ret_product,$line_break=true,$ngg2Image,$button_type=1)
$var_output .= $ret_product->custom_input_label.': <input type="text" name="custom_input" value="'.$ngg2Image->alttext.'" class="eStore_text_input" />';Is there any reason why you are using ngg2Image, instead of nggImage? Neither work for me.
Any help would be greatly appreciated!
Posted 1 year ago # -
@jonnylaris
All seems correct but what are you using $button_type=1 for? No reason for ngg2Image that I can recall. I may have seen nggImage somewhere already or I might have been toying with it, not sure. I'd use ngg2Image just to be safe.
Did you create your own NGG template file in the view directory copied from gallery-wp-eStore.php? If so make sure the name of it is the same as you call it on the gallery page you're making. I named the file gallery-wp-eStore-addtocart.php and then used shortcode [nggallery id=x template=wp-eStore-addtocart] in my page.
Posted 1 year ago # -
$button_type=1 was there before i touched it. It read:
function get_variation_and_input_code($ret_product,$line_break=true,$button_type=1)
And yea i created my own template file in the nextgen view folder and called it on the gallery page.
Posted 1 year ago # -
I don't have $button_type=1 in that function. Mine only reads function get_variation_and_input_code($ret_product,$line_break=true,$ngg2Image)
Posted 1 year ago #
Reply »
You must log in to post.