- This topic has 2 replies, 2 voices, and was last updated 13 years, 11 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Support site for Tips and Tricks HQ premium products
by
Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › Adding Available Quantity to Fancy Display 5
Tagged: available quantity, fancy 5
Ahoy there!
I’m running WP eStore v4.7.6 and would like to know if there’s a way I can insert an “Available Quantity” inside of the Fancy Display 5 (like what displays in Fancy Display 2), either to the right of the “Quantity [X]” field or just below the “Add to Cart” button.
URL: http://www.bowgiggles.com/shop-bow-giggles/
Thanks!
P.S. Kudos for building such an amazing (and that’s an understatement) shopping cart plugin! I absolutely love it.
Glad to hear that you like the plugin. Please open the “shortcode_include.php” file from the extra eStore shortcodes plugin and find the following function:
function show_wp_eStore_fancy5
Look for the following code inside this function:
if($button_type==1)
$output .= get_button_code_for_element($ret_product);
else if ($button_type==2)
$output .= print_eStore_buy_now_button($id);
else if ($button_type=)
$output .= print_eStore_subscribe_button_form($id);
else if ($button_type==4)
$output .= eStore_show_download_now_button($id);
Once you find the above code just add the following line below it:
$output .= $ret_product->available_copies;
This will put the available qty below the button I hope
Sweet! That did the trick, thank you! To make it display to the right of the Quantity [X] field, I added it above the block of code you mentioned and tweaked it a little bit by giving it it’s own class.
$output .= '<div class="eStore-fancy5-quantity">(Only '.$ret_product->available_copies.' available)</div>';
Then I added that class to my css.
.eStore-fancy5-quantity {float:right; margin:8px 25px 0 0; font-weight:bold;}
Thanks again, I appreciate your help.