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
-
August 11, 2010 at 5:16 pm #18583darkmatterMember
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!
September 2, 2010 at 12:13 am #18584jonnylarisMemberHi 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!
September 2, 2010 at 12:38 am #18585darkmatterMemberAll 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.
September 2, 2010 at 12:48 am #18586jonnylarisMember$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.
September 2, 2010 at 12:56 am #18587darkmatterMemberI don’t have $button_type=1 in that function. Mine only reads function get_variation_and_input_code($ret_product,$line_break=true,$ngg2Image)
September 2, 2010 at 12:58 am #18588jonnylarisMemberI tried removing $button_type=1 but all that does is take away the drop down box and lists the varitions as text and still nothing in the custom field.
hmmmmm!
September 2, 2010 at 1:00 am #18589darkmatterMemberTry adding the variable at the end and not before $button_type=1
September 2, 2010 at 1:04 am #18590jonnylarisMemberTried that too, it has the same effect. i.e. displays variations as text and nothing in custom field.
I have tried removing variations all together but still nothing.
September 2, 2010 at 1:09 am #18591darkmatterMemberwhat’s the url of your gallery
September 2, 2010 at 1:13 am #18592jonnylarisMemberIm working on localhost at the moment as the website is actually live minus the shop right now.
You can view the site here: http://www.lawrencemckenzie.com
Gallery in question: http://www.lawrencemckenzie.com/equestrian/28th-august-2010
I have placed the shop/buttons under each image alt title.
September 2, 2010 at 1:15 am #18593darkmatterMemberIn gallery-wp-eStore-addtocart.php:
‘<div id=”ngg-image-<?php echo $image->pid ?>” class=”ngg-gallery-thumbnail-box” <?php echo $gallery->imagewidth ?> >
<div class=”ngg-gallery-thumbnail” >
imageURL ?>” title=”” <?php echo $image->thumbcode ?> >
<img title=”<?php echo $image->alttext ?>” alt=”<?php echo $image->alttext ?>” src=”<?php echo $image->thumbnailURL ?>” <?php echo $image->size ?> />
<span style=”text-align:center;”><?php echo $image->alttext ?>
</span><span style=”text-align:center;”><?php echo get_button_code_for_product(1,$image); ?></span>
</div>
</div>’
Correct?
September 2, 2010 at 1:18 am #18594jonnylarisMember<div id=”ngg-image-<?php echo $image->pid ?>” class=”ngg-gallery-thumbnail-box” <?php echo $gallery->imagewidth ?> >
<div class=”ngg-gallery-thumbnail” >
imageURL ?>” title=”” <?php echo $image->thumbcode ?> >
<img title=”<?php echo $image->alttext ?>” alt=”<?php echo $image->alttext ?>” src=”<?php echo $image->thumbnailURL ?>” <?php echo $image->size ?> />
<span class=”prod_detail”>
<?php echo $image->alttext ?>
<?php echo get_button_code_for_product(1,$image); ?>
</span>
</div>
</div>
September 2, 2010 at 1:24 am #18595darkmatterMemberAll seems right, dunno what to tell you…
btw $nggImage is already used in eStore_misc_functions.php
What version wp-eStore are you running? mine is 3.4.8
September 2, 2010 at 1:27 am #18596jonnylarisMemberVersion v4.1.8, I got it today.
Just to show, I took a screen from the version im working on:
September 2, 2010 at 1:31 am #18597darkmatterMemberThat could be an issue. I’m afraid to upgrade for that reason. The new variables could be interfering somehow. I’d try to install the earlier version with the mod to see if that works. If it still doesn’t then there’s something not configured properly. If it does work then the newer version(s) need more looking into as far as modding.
-
AuthorPosts
- You must be logged in to reply to this topic.