Forum Replies Created
-
AuthorPosts
-
May 31, 2010 at 7:17 pm in reply to: Why Configure Every Product Separately When Used with NextGen Gallery #18572darkmatterMember
Thank you!
$image=” or $nggImage=” for the image reference in the function? I’m assuming you meant $nggImage.
Here’s what I did:
– added $nggImage=” as an argument to function get_button_code_for_product
function get_button_code_for_product($id,$nggImage='')
– added $nggImage to the function call in the template file
<?php echo get_button_code_for_product(1,$nggImage); ?>
– added $nggImage to call the image alttext in the button helper
if($ret_product->custom_input == '1')
{
if(!empty($ret_product->custom_input_label))
$var_output .= $ret_product->custom_input_label.': <input type="text" name="custom_input" value="'.$nggImage->alttext.'" class="eStore_text_input" />';
else
$var_output .= 'Instructions: <input type="text" name="custom_input" value="" class="eStore_text_input" />';
if ($line_break) $var_output .= '<br />';
else $var_output .= ' ';
}Unfortunately, nothing shows up in the custom field: http://camelarae.com/galleries/i9-sports-galleries/i9-sports-flag-winter2010/test-gallery-with-purchase
Not sure I’ve got the argument in the right places. Is $nggImage an actual variable that exists in a table from an ngg gallery array? I see $image in ngg’s code… I’m lost
May 30, 2010 at 4:53 pm in reply to: Why Configure Every Product Separately When Used with NextGen Gallery #18570darkmatterMemberI created a template file and placed it in ngg gallery’s view folder. The template has ‘<?php echo get_button_code_for_product(1); ?>’ where I need the add to cart code. Product 1 is the product I want to use for all pics on this gallery.
The template you created which has ‘<?php echo print_eStore_ngg_buy_now($image); ?>’ is essentially calling the same eStore_misc_functions.php file where both functions are located with the difference being that get_button_code_for_product($id) refers to the variations/etc in eStore_button_display_helper.php. Is that why it’s not working? Do I need to transpose all of the functions onto the same file for everything to work correctly?
Again pardon my ignorance with php, I really hope you can help out!
Vince
May 29, 2010 at 8:16 pm in reply to: Why Configure Every Product Separately When Used with NextGen Gallery #18568darkmatterMemberOK, I’ve been looking a this tediously and from what I can tell:
‘if(!empty($nggImage->alttext))
{
$output .= “<input type=”hidden” name=”item_name” value=”$nggImage->alttext” />”;
}
else
{
$output .= “<input type=”hidden” name=”item_name” value=”$ret_product->name” />”;
}’
This is returning the image alttext on the Paypal page.
Yet when I try to recall same in another function it doesn’t work. What I’d like to do is place somewhere in:
‘if($ret_product->custom_input == ‘1’)
{
if(!empty($ret_product->custom_input_label))
$var_output .= $ret_product->custom_input_label.’: <input type=”text” name=”custom_input” value=”” class=”eStore_text_input” />’;
else
$var_output .= ‘Instructions: <input type=”text” name=”custom_input” value=”” class=”eStore_text_input” />’;
if ($line_break) $var_output .= ‘
‘;else $var_output .= ‘ ‘;
}’
… how to do that??
Thanks
May 29, 2010 at 4:56 pm in reply to: Why Configure Every Product Separately When Used with NextGen Gallery #18567darkmatterMemberThat’s what I thought you guys were going to do when all of this started haha! With my very limited knowledge I won’t be able to really make that happen. If there’s anyone reading this that can offer direction please do! Where I’m starting is in the NGG Gallery template you’ve got ‘<?php echo print_eStore_ngg_buy_now($image); ?>’ which I assume is calling the necessary code to display the ‘buy now’ button. Where do I find it in your plugin code?
Thanks!!
May 28, 2010 at 3:08 pm in reply to: Why Configure Every Product Separately When Used with NextGen Gallery #18565darkmatterMemberShould be working now… albeit a little slow.
May 28, 2010 at 3:21 am in reply to: Why Configure Every Product Separately When Used with NextGen Gallery #18563darkmatterMemberHere’s what I’m currently doing: http://camelarae.com/galleries/i9-sports-galleries/i9-sports-flag-winter2010/i9-2010-colts
It’s 1 product repeated for every picture by pasting the code for the product under each pic. The only differentiator is the customer input. So, what I was hoping to accomplish was to auto-populate the picture’s name in the box and hide the field upon the page loading. This way the buyer only has to select a variation and click add to cart…
May 27, 2010 at 3:31 pm in reply to: Why Configure Every Product Separately When Used with NextGen Gallery #18561darkmatterMember@amin007 That’s really too bad… The integration would be complete imo if the name of the picture could simply port to the cart.
I was looking at this piece of code in eStore_button_display_helper.php lines 132-140 and thought maybe there would be a way to inject the picture instance name in this Customer Input Field (value=””) with code, then hide the field:
‘ if($ret_product->custom_input == ‘1’)
{
if(!empty($ret_product->custom_input_label))
$var_output .= $ret_product->custom_input_label.’: <input type=”text” name=”custom_input” value=”” class=”eStore_text_input” />’;
else
$var_output .= ‘Instructions: <input type=”text” name=”custom_input” value=”” class=”eStore_text_input” />’;
if ($line_break) $var_output .= ‘
‘;
else $var_output .= ‘ ‘;
}’Is this possible? Right now I have the customer inputing the name of the picture manually, selecting a variation (i.e. 8×10, 5×7, wallet size pics) then Add To Cart. All that’s really missing is being able to carry over the name of the picture.
Thanks.
Vince
[code]”) with code, then hide the field:
‘ if($ret_product->custom_input == ‘1’)
{
if(!empty($ret_product->custom_input_label))
$var_output .= $ret_product->custom_input_label.’: <input type=”text” name=”custom_input” value=”” class=”eStore_text_input” />’;
else
$var_output .= ‘Instructions: <input type=”text” name=”custom_input” value=”” class=”eStore_text_input” />’;
if ($line_break) $var_output .= ‘
‘;else $var_output .= ‘ ‘;
}’
Is this possible? Right now I have the customer inputing the name of the picture manually, selecting a variation (i.e. 8×10, 5×7, wallet size pics) then Add To Cart. All that’s really missing is being able to carry over the name of the picture.
Thanks.
Vince
May 26, 2010 at 3:43 pm in reply to: Why Configure Every Product Separately When Used with NextGen Gallery #18559darkmatterMemberThanks again Ivy!
I implemented the template and I have a couple of questions:
– How can I change the “Buy Now” button into an “Add To Cart” button instead so that products are added to the cart.
– How can I add the variations drop down menu to each picture as well?
Vince
May 25, 2010 at 4:48 pm in reply to: Why Configure Every Product Separately When Used with NextGen Gallery #18557darkmatterMemberAwesome awesome!!! Thanks guys for working on this. I will give this a try as soon as I can get my hands on the update
darkmatterMemberAmin, any further developments on the ability to port thumb/alttxt to the cart of a NGG pic? Thanks! All I have going for now is something like http://camelarae.com/galleries/i9-sports-gallery/i9-sports-2010-49ers
It would be nice not to have to make the purchaser copy/paste the name of the pic
darkmatterMembernm I found a solution there, thank you!
darkmatterMemberSo I’m looking for code that starts the form related to the variations pull down and can’t seem to find it. Can you point me in the right direction on where to insert the class designation for it?
Thanks!
darkmatterMemberThanks Amin, will do!
darkmatterMember@Amin, I’ve been playing around with this a little and essentially, what I’ve done right now is make the purchaser enter or “confirm” the file name with the Collect Customer Input field, which carries on to the cart. I tried to add the code for the echo of the NGG image on line 127 of eStore_button_display_helper.php but that only rendered the text, not the result haha. Sorry, I’m not a coder. All it would seem to me is to allow that php function to call the name in question and add it in there then make the field invisible… just thoughts.
darkmatterMemberbump! @amin007
-
AuthorPosts