Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

Display items that are not for sale & sold out redirection

by

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 14 years, 2 months ago by odiousfunk.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • March 22, 2011 at 2:09 pm #3011
    odiousfunk
    Member

    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 #30523
    odiousfunk
    Member

    It 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 #30524
    odiousfunk
    Member

    OK… 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.

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ