Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore Tweaks › Display items that are not for sale & sold out redirection
Tagged: not for sale, redirection, sold out
- This topic has 2 replies, 1 voice, and was last updated 13 years, 8 months ago by odiousfunk.
-
AuthorPosts
-
March 22, 2011 at 2:09 pm #3011odiousfunkMember
I have an art gallery where I want a single location to exhibit the work. I WAS using nextgen with the simple shopping cart, but with eStore I don’t want to maintain two sets of product data, thus I am doing away with nextgen (perhaps there is a gap in my understanding of integrating nextgen and estore).
Regardless, I would like two things:
1: to display a product with no dollar value and a button that says ‘not for sale’. I have set the quantity available to 0 and put ‘Not for Sale’ in the price, but obviously I get a dollar sign within the Price display. Also, within the settings, there is no image url setting for a ‘Not for Sale’ button. I will settle for modifying the code to allow for one. I can read php well enough if you point me in the best direction to do so.
2: to redirect to a ‘sold out’ page where a buyer can request restocking or interest. I would like to know where to place a url link around the ‘Sold Out’ button so that the interested party can request restocking. I see some code within the misc_functions so will begin there, but if you can confirm this approach I would appreciate it.
Thanks!
March 22, 2011 at 6:11 pm #30523odiousfunkMemberIt was easy enough to add a link outside the input tag of the ‘sold out’ button build within the ‘get_button_code_for_element’ function of ‘eStore_misc_functions.php’.
And I added a second if statement to look for a -1 qty for those products I did not want to sell. However, the product display lists the qty avail of -1 which I am trying to locate and remove.
Code:if ($ret_product->available_copies == -1)// Not for sale
{
$replacement = ‘<input type=”image” src=”http:…/notforsale.png” class=”eStore_sold_out” title=”This item is not for sale.” alt=”NOT FOR SALE”/>’;
return $replacement;
}Can anyone point me in a direction to remove the text that lists the qty available from the product display?
Thanks
March 22, 2011 at 6:22 pm #30524odiousfunkMemberOK… leave me alone long enough and I might just find my answers.
I found the code related to where the qty was being output and simply qualified it first:
Code:if (!empty($ret_product->available_copies))
if ($ret_product->available_copies > 0)// We got some
{
$output .= ”.ESTORE_AVAILABLE_QTY.’: ‘.$ret_product->available_copies;
}
else
{
$output .= ”;
}Great product!
edit: I thought the bbcode code brackets would handle the html pagebreak in the code but it does not… just note that there is a pgbrk between the single quotes before the ESTORE_AVAIL and within the single quotes of the else.
-
AuthorPosts
- You must be logged in to reply to this topic.