• Dear Ronald
    I have installed the ithemes exchange custom loop add-on.
    I have now a fantastic grid showing my products. I want to show the inventory on this grid as well. where can I add / change stuff like:
    ————
    <?php
    $inventory = it_exchange( ‘product’, ‘inventory’, ‘return=true’ );

    if ( 0 == $inventory ) {
    echo ‘Helaas, dit product is niet meer op voorraad!’; // We’re completely out
    } elseif ( 1 == $inventory ) {
    echo ‘Er is er nog maar 1!’; // There is one in stock
    } else {
    printf( ‘We hebben er %s op voorraad.’, number_format( $inventory, 0, null, ‘,’ ) );
    } ?>

    —-

    Hope you can help me out

    Brent

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author ronaldvw

    (@ronaldvw)

    Hi,

    the custom loop add-on only manipulates the loop, it filters, and changes the order in which products are displayed. The content of the products is provided by the default Exchange templates, these are not part of the custom loop add-on.

    So re. “where can I add / change stuff like”, you would do that by copying the template file for the product to your active theme in a folder named “exchange”, observing the entire file path, and edit that template file.

    I realise that you have added a support request at iThemes, and that you were referred here, but the add-on does not contain any template files.

    Check this out though: https://ithemes.com/forum/topic/68646-tags-and-category-added-in-product-page/#entry288588

    Thread Starter VanBrent

    (@vanbrent)

    Just to be clear. Which element is ‘your’ loop using? Then I can use that element, place it in the exchange folder of my childtheme and add the inventory. (Which is originally a little element itself.)

    Plugin Author ronaldvw

    (@ronaldvw)

    The loop is using the content-store/elements/product template part to display a product, as does the default Exchange Store page.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Adding inventory to custom loop’ is closed to new replies.