WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: eShop] how to display "sku"? (13 posts)

  1. 4et
    Member
    Posted 5 years ago #

    Firstly, thanks to elfin for this GREAT pligin eshop.
    And how to display "sku" in my template? thanks.

  2. elfin
    Moderator
    Posted 5 years ago #

    That isn't possible at this time. Sorry.

  3. danpoynor
    Member
    Posted 5 years ago #

    Any tricks to get the sku to show up on the page? Maybe I need to create a Custom Field? Seems redundant though. Maybe there's a custom php query someone has come up with?

    I've build a wholesale catalog for retailers and they need the sku to be shown with each product. Hope there's some way to do that.

  4. elfin
    Moderator
    Posted 5 years ago #

    I'm adding this to my todo list.

    I'd first thought of making a shortcode, but on reflection an overall setting to display the sku might be better.

  5. danpoynor
    Member
    Posted 5 years ago #

    Massively appreciated.

  6. elfin
    Moderator
    Posted 5 years ago #

    Hope the changes made were ok - let me know if you need any tweaks to it.

  7. danpoynor
    Member
    Posted 5 years ago #

    I'm trying to figure out a way to let folks search by sku.

    For example, sometimes retailers enter the sku number "30170" instead of the product name to search for. Searching by sku doesn't display any results currently though.

  8. elfin
    Moderator
    Posted 5 years ago #

    Unless you manually add the sku to the content of the page it won't be found by the search, sorry.

  9. blackercomputerz
    Member
    Posted 5 years ago #

  10. elfin
    Moderator
    Posted 5 years ago #

    what has this to do with eShop?

  11. grizzdesign
    Member
    Posted 4 years ago #

    @enfin:

    Isn't is possible to make eShop store all it's data that is entered in eShop's write panel on the Edit Page-page be stored in a custom field ?

    ie. custom-field-key's like "eshop_cf_sku", "eshop_cf_productdescription", "eshop_cf_shiprate", "eshop_cf_featuredproduct", "eshop_cf_stock" , "eshop_cf_imgurl"

    That way it's possible to pimp our products pages a little to our imagination.

    Currently all I got is a Shop Home that's generateed by a eShop shortcode (with images), but the products page (which is just page.php and the_content()) - doesn't display the asociated image or any data I want on it.

    Only thing that differs my product page from a default page is the appended block with Order/Quanty/Add to card-options.

    --
    gd

  12. grizzdesign
    Member
    Posted 4 years ago #

    Hey, I found it !!

    I was browsing the plugin's php files and saw a file called -custom-fields.php

    It turns out eShop does indeed store it's data in custom fields;

    Here's the overview of a few examples:

    $sku = get_post_meta( $_REQUEST[ 'post' ], '_Sku' );
    $prod=get_post_meta( $_REQUEST[ 'post' ], '_Product Description' );
    $shiprate = get_post_meta( $_REQUEST[ 'post' ], '_Shipping Rate' );
    $featured = get_post_meta( $_REQUEST[ 'post' ], '_Featured Product' );
    $stkav = get_post_meta( $_REQUEST[ 'post' ], '_Stock Available' );
    $stkqty = get_post_meta( $_REQUEST[ 'post' ], '_Stock Quantity' );
    $optsets = get_post_meta( $_REQUEST[ 'post' ], '_eshoposets' );

    So, in page.php (or page-product.php if you have a seperate Page Template for it (which I'd recommend))
    You can use something like this:

    $prodDecr = get_post_meta($post->ID, '_Product Description', true);
    if (!empty($prodDecr)) {
    	echo "<span class='product-description'>" . $prodDecr . "</span>";
    }

    Apparently the plugin changes in the past 10 months and/or the Elfin/topic-starter ment something else.

    --
    gd

  13. elfin
    Moderator
    Posted 4 years ago #

    please don't restart out dated threads.

    Besides, you add whatever content you want to the page/post of a product, I let WP handle all that.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags