Sold out

This topic contains 3 replies, has 1 voice, and was last updated by  ClassiBase 2 years, 10 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1389 Reply

    MK

    I want to add sold out to picture which sold out products.
    Could you tell me how to change setting or change PHP code.

    #1391 Reply

    ClassiBase
    Keymaster

    In case you want to display “Sold out” text for expired ads it is possible only for ad page. Because expired ads are not listed on website. But they are visible with expired warning message when expired ad accessed directly from old URL. This is done in order to display expired ad for visitors who bookmarked it before or indexed by google and accessed from search engine.

    So you can add any custom text to expired ad which will be visible only when user visits expired ad. To do it edit /user-content/themes/THEME_NAME/views/index/ad.php file and add custom php code similar to this:

    if(Ad::isExpired($ad,true))
    {
    echo '<h3>Sold out</h3>';
    }
    #1392 Reply

    MK2

    Thank you for reply.
    I want to echo‘<h3>Sold Out</h3>; when I choice Custom fields Value Sold.

    I try your sample code and some code what I think,But I can’t.

    Could you tell me how to do?

    #1408 Reply

    ClassiBase
    Keymaster

    If you use custom field with value “sold out” then it will be displayed on ad page with all custom fields for given ad. It will be formatted same way al all custom fields depending on your theme (not specifically wrapped in H3 tags).

    Also if you want to make that Sold out custom field visible on listings then click on “L” button on side of custom field that has “Sold out” value on Custom field assigning panel.

    It can be found on “Manage” -> “Category custom fields” page click on related category where you use “Sold out” custom field. then on opened page you will see small “L” (means display on listing) and “S” (means searchable custom field will be displayed in search form when user viewing related category) buttons.

    Related tutorial about custom fields can be found here

    http://classibase.com/how-to-add-custom-field-to-classifieds-website/

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Sold out
Your information:




This entry was posted on by .