Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore F.A.Q/Instructions › Why Configure Every Product Separately When Used with NextGen Gallery
- This topic has 102 replies, 15 voices, and was last updated 11 years, 3 months ago by ssaf.
-
AuthorPosts
-
September 17, 2010 at 10:04 pm #18628Arrow325Member
I copied gallery-wp-eStore.php and and renamed it “gallery-wp-eStore-addtocart.php”. I then added the following code to the “addtocart” file per step 1 from Parris’ post:
<span class=”prod_detail”><?php echo $image->alttext ?><?php echo get_button_code_for_product(1,$image); ?></span>
and I put that in the /view folder for the nextgen plugin. I believe that is what you meant by creating a new NG Gallery view template? I apologize if I misunderstood, I’m not very good with php.
Line 90 of eStore_misc_functions.php is as follows:
function get_button_code_for_product($id,$image)
The rest of the code for the function on line 90 is in the previous post.
Thanks!
September 17, 2010 at 10:28 pm #18629darkmatterMemberok, it would seem like you are calling the store code twice in your NG Gallery template. The page looks like it’s working, but the Size/Frame/Input/quantity, etc. fields are repeated…
I’d check the template for errors.
Vince
September 18, 2010 at 1:07 am #18630Arrow325MemberThanks! I found the trouble in gallery-wp-eStore-addtocart.php. I had to replace “<span><?php echo $image->caption ?></span>”
with the code new span:
“<span class=”prod_detail”><?php echo $image->alttext ?><?php echo get_button_code_for_product(1,$image); ?></span>”
I had originally just added the new stuff in, leaving the old code in there too. Correcting that fixed the error message I was getting, but now I have another issue.
The alttext, variable options, and Add To Cart button are now in-line instead of being separated by line breaks. It also looks like the div for the thumbnail extends several inches to the right or the image border.
You can see an example here: http://thinktankgallery.com/?page_id=68
I tried to use the original short code [nggallery id=1 template=wp-eStore] so I could inspect the elements with Firebug and see what I could see, but when I use that shortcode I get the same error message I was getting before the aforementioned edit to gallery-wp-eStore-addtocart.php.
Thanks for your help! I really appreciate you taking the time to help me out.
September 18, 2010 at 6:30 am #18631Arrow325MemberOkay, I got figured out. The alignment issues were were caused by the “$ngg2Image” reference in eStore_misc_functions.php: apparently the placement matters. When it was the last item listed (afer $button_type), the alignment was wrong. To make everything be properly aligned, I had to enter it like this:
function get_variation_and_input_code($ret_product,$ngg2Image,$line_break=true,$button_type=1)
Now the only remaining problem is a colon appearing between the variable option dropdowns and the Add To Cart button. I’m pretty sure it is the colon that came after the title of the Input field, but I can’t seem to find it in the eStore css.
September 21, 2010 at 3:45 pm #18632darkmatterMemberYou wouldn’t find that in the CSS, sounds more like remnant code bits in one of your php files, check the NG Gallery template meticulously.
September 24, 2010 at 1:11 pm #18633gordolakeMemberhmmmm would luv to get this workiing too.
tried all the code chabges and additional template php to ngg.
locked me out of my wp-admin with error on line 100 of one of the php files. anyway im on 4.3.4 of wp-eShop. anyone else got this working with latest version.
thanks
January 10, 2011 at 7:12 am #18634amin007ParticipantI have added a new template in eStore so you can use “add to cart” type buttons. The template is stored in the “view” directory of the eStore plugin and is called “gallery-wp-eStore-auto-addtocart.php”.
You can use the following shortcode to use this template:
[nggallery id=1 template=wp-eStore-auto-addtocart]
1 is the ID of the nextgen gallery.
October 18, 2011 at 3:48 pm #18635btriversMemberGreat plugin! I’m using [nggallery id=1 template=wp-eStore-auto-addtocart] but I wanted to keep the purchased version of my photos secure, but still use the NextGen gallery “auto” method of selling the photos. Of course this wasn’t the case because as you state at the beginning of this thread the photo that is viewed in the NextGen gallery when the thumbnail is clicked, is the same that is made downloadable by eStore.
So I searched through the code and made the following changes so that the Digital Product URL specified in the Product ID used as the template is prepended to the NextGen filename and this becomes the full product download url.
a) eStore_post_payment_processing_helper.php – Copied the eStore_get_ngg_image_url function and created a new function called eStore_get_ngg_image_url2($pictureID,$item_name,$product_download_url) that builds the image url using:
$imageUrl = $product_download_url . $image->filename;
b) paypal.php – Changed to use new function:
$download_link = eStore_get_ngg_image_url2($pictureID,$cart_item_data_name,$retrieved_product->product_download_url);
I hope this helps out. Would be great to have this option built in to the plugin.
Thanks again,
Brad
October 19, 2011 at 1:31 am #18636adminKeymasterThank you for sharing the modifications you made. I wouldn’t mind adding it to the plugin but I have one question. Doesn’t it mean that you still have to upload the images separately in a different folder?
Also I should mention the following post which has another way of achieving something similar:
October 24, 2012 at 3:14 pm #18637btriversMemberYes, I believe I uploaded the images separately to a different folder.
(Just received an personal email query regarding this – my response is below.)
In fact this solution is no longer in use for my client and I have to admit my memory is fuzzy, but I believe that I uploaded the high-res / purchasable version of the images to a protected directory that I was able to specify in the plugin settings. Then I uploaded a watermarked/smaller version of the images with the same names for use with the gallery thumbnails. So the watermarked/small version is used for the gallery where anyone can download it, but a purchaser is able to download the full high-res version they paid for. So that works nicely.
July 31, 2013 at 4:49 pm #18638ssafSpectatorHas this type of solution (global secure URL instead of setting each individually) ever been worked into the plugin, or are there plans for it at some point? This plugin is absolutely perfect for us except for this issue.
We are motorsport event photographers and have been using a thirdparty solution that has proven woefully overwhelmed by the sheer number of images we process daily. Our average shoot rate is 5000 images PER DAY to be uploaded, processed, databased and rendered. We sell extremely high resolution photographs, so we have a ‘mid-sized’ version that is uploaded to the gallery. The originals are elsewhere on the server.
Recently we have had to fulfill orders manually and that is simply not feasible without adding staff, so an auto, yet secure, solution is essential. Obviously, we aren’t the only ones with this problem.
Wouldn’t it make sense to add a field for the ‘secure directory’ path in one of the screens, perhaps the template creation, where this is an option and can be set once and then automatically prepends to the URL? Or better yet, is called as a separate field so that it can be changed as necessary, and then the download URL generates on the fly based on this field?
The ‘WP_ESTORE_ENABLE_ADVANCED_NGG_FILE_SERVE’ hack in the link above doesn’t really make the image any more secure than just sticking it in the gallery directory to begin with, plus it renames the original image and that screws up scripts running elsewhere.
I guess my point is to please request that you consider a field for ‘secure path’ or whatever and use that as a setting input option to generate the (far more secure) download.
Other than that, I am totally blown away with the functionality and usefulness of this plugin. It is, without a doubt, the best money I have ever spent on app tools, and I was an app developer in a previous life, so that’s saying something!
August 1, 2013 at 1:18 am #18639adminKeymasterHi, We have found that photographers (who have a large number of photos) need certain things which is best to solve with a specific product developed just for them. We are nearly finished with a product that we have developed just for photographers that should solve this issue. I will give you an update when we have this new item is ready.
Thank you for your kind words.
August 1, 2013 at 3:44 pm #18640ssafSpectatorOh, PLEASE do, that would be perfect. Consider us camped out in front of the store waiting in line, as I’m quite pleased with this plugin.
One other thing that would be helpful is a datepicker menu selector to take people directly to a particular date (for dated galleries, such as ours and other event photography), much like the archive calender, based on the publish date, which we adjust to match the photo date.
It really is obvious how much thought has gone into making this intuitive. Can’t wait to show this new site to our colleagues who are also at their wit’s end with their thirdparty “solution”. I will have your download URL ready for them haha! Thanks again.
-
AuthorPosts
- You must be logged in to reply to this topic.