Condition of item for auction

WordPress Business Themes Forums Responsive Themes Auction Theme Condition of item for auction

Discontinued - The forum content is out of date. For theme support please use our support desk here.

Condition of item for auction

September 20, 2018
 Roy

  • Roy
    Senior Member 124 points

    How can I add additional selections to the Condition menu? Currently the options are only New and Used and I would like to add more options.

    September 20, 2018 at 3:52 pm
  • JamesD
    JamesD
    Super Guru 1,351 points

    Hello Roy,

    The only way I’m seeing is to at least make a few changes in the /AT/framework/class/default_auction.php. I’m not sure how in depth you would need to go, but changes there may be enough.

    Note: The bold is what I’ve changed/added.

    Around line #1905 you would need to add the additional option(s). In the examples I’ve added the condition Other.
    Original code:
    "condition" => array("label" => "Condition", "values" => array("1" => "New", "2" => "Used") ),

    After change:
    "condition" => array("label" => "Condition", "values" => array("1" => "New", "2" => "Used", "3" => "Other") ),

    Around line #2607 you add the condition word.
    Original code:
    "91" => __("Condition","premiumpress"),
    "92" => __("New","premiumpress"),
    "93" => __("Used","premiumpress"),
    "94" => __("available","premiumpress"),
    "95" => __("Buy Now Quantity","premiumpress"),
    "96" => __("Enter the number of items available for sale.","premiumpress"),
    "97" => __("Bids","premiumpress"),
    "98" => __("Won","premiumpress"),
    "99" => __("Messages","premiumpress"),
    "193" => __("Other","premiumpress"),
    );

    After change:
    "91" => __("Condition","premiumpress"),
    "92" => __("New","premiumpress"),
    "93" => __("Used","premiumpress"),
    "94" => __("available","premiumpress"),
    "95" => __("Buy Now Quantity","premiumpress"),
    "96" => __("Enter the number of items available for sale.","premiumpress"),
    "97" => __("Bids","premiumpress"),
    "98" => __("Won","premiumpress"),
    "99" => __("Messages","premiumpress"),
    "200" => __("Other","premiumpress"),
    );

    Note: I used 200 to keep distance from other PP language refs to avoid conflict.

    Around line #2152 need to add the condition(s) to display the new “condition” options:
    Original code:
    if($condition == 1){ echo $CORE->_e(array('auction','92')); }else{ echo $CORE->_e(array('auction','93')); }

    After change:
    if($condition == 1){ echo $CORE->_e(array('auction','92')); } else if ($condition==2){ echo $CORE->_e(array('auction','93')); } else { echo $CORE->_e(array('auction','200')); }

    I’ve attached the file with the changes, so can get a better idea and play with it.

    Attachments:
    You must be logged in to view attached files.
    September 20, 2018 at 10:57 pm
  • Marie
    Marie
    Super Guru 1,747 points

    Thanks for sharing James.

    September 21, 2018 at 8:54 am

  • Lindsay
    Newbie 26 points

    Same issue with conditions and also shipping’

    I’ve added custom fields for both!
    Not the best option.though!
    Me thinks the developer could at least consider updating each to reflect
    alternatives.

    Attachments:
    You must be logged in to view attached files.
    September 21, 2018 at 10:24 am

  • Roy
    Senior Member 124 points

    @JamesD. Thanks for the details. But I also wonder would it be easier to remove that preset Condition field and then just add our own as a new Custom Field?

    @Lindsay. Agreed. And I basically did the same with custom options for shipping.

    September 21, 2018 at 4:27 pm
Viewing 5 posts - 1 through 5 (of 5 total)

Didn't find what you were after?

Chat with us now

or contact our support team