Forum Replies Created
-
AuthorPosts
-
September 17, 2010 at 12:53 am in reply to: Why Configure Every Product Separately When Used with NextGen Gallery #18624ParrisMember
And I just discovered I still needed to have at least a space <spacebar> in the field label (in Additional Product Details) to keep the word “Instructions” from showing up. Chalk that up to my very dim understanding of how this all works.
September 17, 2010 at 12:38 am in reply to: Why Configure Every Product Separately When Used with NextGen Gallery #18622ParrisMemberSmall syntax correction: needs to be:
to $var_output .= 'Instructions: <input type="text" name="custom_input" value="'.$ngg2Image->alttext.'" class="eStore_text_input" />';'
(notice the quote symbols on either side of .$ngg2Image->alttext.)September 17, 2010 at 12:22 am in reply to: Why Configure Every Product Separately When Used with NextGen Gallery #18621ParrisMemberRight. For me, I think this was the last thing keeping the field from being filled with the image file name (because I had “Collect Customer Input” checked correctly(in Manage Products/[whateveryourproductnameis]/Edit/Additional Product Details/), but absolutely nothing in the “Field Label:”. I think this triggers the function that gives you the default label of “Instructions”. Dark Matter knows what’s up. Thank you for finding this glitch that was keeping from success!
September 16, 2010 at 9:49 pm in reply to: Why Configure Every Product Separately When Used with NextGen Gallery #18619ParrisMemberHey, cool. Thanks. I’m installing Yahoo IM now.
September 16, 2010 at 9:28 pm in reply to: Why Configure Every Product Separately When Used with NextGen Gallery #18617ParrisMember@dark matter
Well I fixed my missing “2” in eStore_button_display_helper.php so that it reads:
$var_output .= $ret_product->custom_input_label.': <input type="text" name="custom_input" value="'.$ngg2Image->alttext.'" class="eStore_text_input" />';
That was the only thing I could find to correct since the $image references you mentioned do exist already in the original code.
I’m afraid I still don’t have anything showing up inside the field. Is that what you see?
September 16, 2010 at 8:41 pm in reply to: Why Configure Every Product Separately When Used with NextGen Gallery #18616ParrisMemberdark matter –
Wow. Your response was fast. I can’t believe you read through my long post already and replied noting my error(s). This is Great! I will correct, test, and let you know. Thanks.
September 16, 2010 at 8:36 pm in reply to: Why Configure Every Product Separately When Used with NextGen Gallery #18615ParrisMemberI just thought I should add that I saw on page 6 and 7 of this thread (dark matter and jonnylaris’s posts) that there was a concern that the version of eStore might be an issue. I think it was decided that it doesn’t matter. However, just in case, my version is 4.2.7
September 16, 2010 at 8:14 pm in reply to: Why Configure Every Product Separately When Used with NextGen Gallery #18613ParrisMemberHi Folks,
Would anyone who has got this modification working be willing to help me get it running? I think I’m probably just missing some small detail somewhere. The testing site for my project is littlegraphicsengine.com/wpcms/main-gallery
As you should see on the page (linked above), I have the name of the file showing to the left of the variations dropdown, the customer field is showing up on the second line (with the default label of “Instructions”), and I have an “Add to Cart” button graphic on the third line. I just don’t have the customer field populated with the file name (which I think is what needs to happen for the file name to get passed to the cart. Right?)
I’m not a PHP coder but I think I’ve been able to follow the basic logic. Here’s what I’ve done following Dark Matter’s instructions and various other member’s snippets in this thread (while I’m at it, I figure I’ll try and include a good level of detail so we’ll have a more complete step by step. So sorry in advance for the long post):
1. Starting in the plugins directory of my WordPress installation, I made a copy of gallery-wp-eStore.php (from wp-cart-for-digital-productsview) , renamed it “gallery-wp-eStore-addtocart.php” and put it in nextgen-galleryview. I then added this code to wp-eStore-addtocart.php just after the closing “/a” html tag in the Thumbnails section:
<span class="prod_detail"><?php echo $image->alttext ?><?php echo get_button_code_for_product(1,$image); ?></span>
2a.In wp-cart-for-digital-products I modified eStore_misc_functions.php, adding the $image variable to the existing function so that it now look like this:
function get_button_code_for_product($id,$image)
{
global $wpdb;
$products_table_name = WP_ESTORE_PRODUCTS_TABLE_NAME;
$ret_product = $wpdb->get_row("SELECT * FROM $products_table_name WHERE id = '$id'", OBJECT);
$output = get_button_code_for_element($ret_product,'',$image);
return $output;
}($image added in two places) and adding $ngg2Image=” to this other function here:
function get_button_code_for_element($ret_product,$line_break=true,$ngg2Image='')
and adding $ngg2Image further down in this same function so it looks like this:
$var_output = get_variation_and_input_code($ret_product,$line_break,$ngg2Image);
2b. Also in wp-cart-for-digital-products I modified eStore_button_display_helper.php, adding the $ngg2Image variable to an existing function so that it now looks like this:
function get_variation_and_input_code($ret_product,$line_break=true,$ngg2Image,$button_type=1)
Then towards the bottom of the function, I added $ngg2Image so that it looks like this:
$var_output .= $ret_product->custom_input_label.': <input type="text" name="custom_input" value="'.$nggImage->alttext.'" class="eStore_text_input" />';
3. I have a gallery of pictures set up using NextGen.
4. I created a new product in eStore with “Collect Customer Input” checked and left the Field Label blank ( in the “Additional Product Details” section), set a Product Price of 0.00 and added my variations.
5. I have the shortcode [nggallery id=1 template=wp-eStore-addtocart] in a page called Landscapes (1 is the gallery ID number for my gallery, also called Landscapes).
6. Following the standard instructions for NextGen gallery and eStore I have these settings as well:
Under Gallery (NextGen settings), in “Manage Gallery”, I have my gallery “Landscapes” with Page Link to “Landscapes” (the page with this name). Also, since I have this gallery in an album and want the album thumbnails to link to the actual page where my “Add to Cart” buttons show up (and not the gallery url that NextGen gallery assigns to Album thumbs by default), I have “Deactivate gallery page link:” unchecked (in Options/Gallery tab).
Then for eStore’s settings I have an Add To Cart button link set (in Settings/General Settings (Add to Cart button text or Image). Also I have “Product ID to be Used as a Template” set to 1 (in WP eStore Settings/3rd Party Integration/NextGen Gallery Settings (1 is the ID of my product that I’m using as a template).
7. Once the file name is showing up in the field properly, then the field needs to be hidden so customers won’t accidentally put something else in there. I think it’s a simple matter of hiding the field with CSS (which I can figure out). But I don’t remember how to do that at the moment, so if anyone wants to chime in about that, please do! Otherwise I’ll add it to this Step by Step later, once I get things working.
Ok, I think that is it, minus whatever crucial bit I’m missing (as it’s not yet working [customer field not getting populated with the file name of the image], which is why I need help).
Thanks!
-
AuthorPosts