Ask the community

This is a community support forum where you can ask
questions and interact with other PremiumPress Customers.

Condition of item for auction


  • Roy
    Senior Member 124 points
    September 20, 2018 at 3:52 pm

    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.

  • JamesD
    JamesD
    Super Guru 1,345 points
    September 20, 2018 at 10:57 pm

    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.
  • Marie
    Marie
    Super Guru 1,747 points
    September 21, 2018 at 8:54 am

    Thanks for sharing James.


  • Lindsay
    Newbie 26 points
    September 21, 2018 at 10:24 am

    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.

  • Roy
    Senior Member 124 points
    September 21, 2018 at 4:27 pm

    @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.

Viewing 5 posts - 1 through 5 (of 5 total)