Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

eStore – Use existing custom post type meta field for product ID

by

Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › eStore – Use existing custom post type meta field for product ID

  • This topic has 3 replies, 3 voices, and was last updated 10 years, 2 months ago by wzp.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • March 7, 2015 at 9:28 am #12318
    pstavrou
    Member

    I already have a custom post type, with its own custom fields. I would prefer to use that information instead of re-entering everything in your plugin’s “Manage Products” section.

    I use this code:

    <?php

    $product_id = get_post_meta( get_the_ID(), ‘MY_CUSTOM_FIELD’, true );

    echo get_button_code_for_product($product_id);

    ?>

    It returns this error message:

    “Looks like you have entered a product ID (MY CUSTOM FIELD VALUE) that doesn’t exist in the product database. Please check your product ID value again!”

    Is there a way to use my existing database entries?

    March 7, 2015 at 10:51 pm #68995
    wpCommerce
    Moderator

    Hi, Have you checked to make sure that $product_id variable has a value assigned to it? echo the $product_id value before you call the eStore’s function. If the variable is not empty then is it passing a valid product ID that exists in the eStore database?

    March 8, 2015 at 6:57 am #68996
    pstavrou
    Member

    Thank you for your prompt reply. The eStore database is empty and therefore there is no valid product ID.

    I am just asking if it is possible to use existing database entries (my custom post type with its own custom fields), instead of the eStore database. It seems that to use the eStore database it is necessary to manually enter all the content. I would rather avoid that cumbersome procedure, since my data already exists as my own custom post type.

    As a side note, I am already able to successfully use php to call my custom fields with the free version of your plugin — I don’t need to retroactively enter the shortcode. It would be great if I could do the same with the premium version.

    March 8, 2015 at 1:44 pm #68997
    wzp
    Moderator

    So, from what I understand, you want to not use the eStore database to run your store.

    You must have an eStore product configured in the eStore plugin to use it. Here are some similar topics:

    • https://support.tipsandtricks-hq.com/forums/topic/estore-help-moving-from-wp-paypal-shopping-cart-to-wp-estore
    • https://support.tipsandtricks-hq.com/forums/topic/estore-upgrading-from-simple-paypal-shopping-cart-to-estore-cart
    • https://support.tipsandtricks-hq.com/forums/topic/using-shortcde-to-create-products
    • https://support.tipsandtricks-hq.com/forums/topic/estore-on-the-fly-product-workaround

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ