Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › Hide Qty Available
Tagged: Available Qty, hide, Hide Quantity, inventory, qty, quantity
- This topic has 13 replies, 8 voices, and was last updated 8 years, 9 months ago by
foothillslocalmeats.
-
AuthorPosts
-
August 9, 2010 at 5:26 pm #1651
cflyrun
MemberHi there,
I’d like to hide the quantity available from customers – I want to *use* inventory control, I just don’t want people to be able to see how many are available. I use this for seminars and workshops, and if people see there are a lot available, they don’t sign up as quickly as I’d like
Then there’s a rush at the last moment!
I can edit code,
Thanks,
Daisy
August 10, 2010 at 12:42 am #23213amin007
ParticipantUpdate: A better way to handle this is to use a CSS tweak.
1) Grab this plugin (if you don’t have something similar already):
https://www.tipsandtricks-hq.com/wordpress-custom-css-plugin-6413
2) Insert the following css in there:
.eStore_available_qty{
display: none;
}That should do it.
I have a feeling you are using the fancy1 display and you don’t want to show the “Available Qty” in that display. If my guess is correct then open the “eStore_misc_functions.php” file and search for the following lines:
if (!empty($ret_product->available_copies))
$output .= '<br />'.ESTORE_AVAILABLE_QTY.': '.$ret_product->available_copies;Once you find it just delete it and that will do the job.
August 11, 2010 at 4:18 pm #23214cflyrun
MemberYes, I’m using the fancy display but don’t want to show Available Qty.
Thanks for the code edit!
Daisy
January 31, 2011 at 5:18 am #23215Chris
MemberThanks – Yes, I’m also using Fancy1 display and this little fix did the job.
July 26, 2011 at 12:02 am #23216Cai
MemberHello.
I would like to remove the ” Availabe Qty ” from being displayed in fancy2 – I would still like to limit the available copies using the inventory control though.
Can I do this using the same method described above?
Thanks!
July 26, 2011 at 3:29 am #23217Ivy
MemberHi, In the “eStore_misc_functions.php” file search for the following
if (!empty($ret_product->available_copies))
You will need to go to the 2nd occurrence (this should be under the following code section “function show_product_fancy_style2”)
Once you find this code delete the following:
if (!empty($ret_product->available_copies))
$output .= '<br /><strong>'.ESTORE_AVAILABLE_QTY.': </strong>'.$ret_product->available_copies;July 26, 2011 at 8:45 am #23218Cai
MemberThats great Ivy. Thank you
July 27, 2011 at 1:34 pm #23219Cai
MemberUpdate. This did not work quite as expected.
It does remove the available quantity, but it messes up the styling of the fancy display and even the sidebar widgets. Not sure what I am doing wrong, I know nothing of php.
Thanks
July 27, 2011 at 11:56 pm #23220Ivy
MemberSorry about that, an extra line got in the code when I copied it. I have revised the above code. Please redo the modification using the code above.
Note: Please make sure to undo the first modification as this removed an extra line of code.
October 29, 2011 at 10:30 pm #23221kmk293
MemberRelated to this, I would like to change the text of “Available Qty” within Fancy1, Fancy2, and Fancy3 displays. I’ve searched through a ton of the php files but can’t seem to locate it. Thanks!
October 30, 2011 at 2:24 am #23222kmk293
MemberMay 20, 2016 at 1:10 pm #23223foothillslocalmeats
MemberHi there,
I know this is an old topic, and perhaps that it why the fix offered isn’t working for me…
I’m using fancy1, and when I make the php edits suggested, it takes out my site. I’m a php novice, so perhaps I need more guidance.
Thanks
May 21, 2016 at 4:53 am #23224admin
KeymasterIt is easier to do this using CSS (Instead of PHP edit). Do the following:
1) Grab this plugin (if you don’t have something similar already):
https://www.tipsandtricks-hq.com/wordpress-custom-css-plugin-6413
2) Insert the following css in there:
.eStore_available_qty{
display: none;
}That should do it.
May 26, 2016 at 11:05 am #23225foothillslocalmeats
MemberYes! I so prefer CSS solutions to PHP solutions. This worked perfectly. Thanks!
-
AuthorPosts
- You must be logged in to reply to this topic.