• Resolved willhouse

    (@willhouse)


    Hello,

    I have followed the instructions in setting up a template override using the “single-item.php” template. However, when I try to use the wpinventory_the_price(); function the price displays 0.00.

    My exact code to display the price is below:

    <p><?php wpinventory_the_price(); ?></p>

    I have triple checked that a price is set in inventory item and have even disabled my overridden templates to see that a price does exist but as soon as I enable my custom template the price disappears.

    Please see the issue here: https://milkandhoneyvintagerentals.com/rentals/inventory/1940sredradio/

    Perhaps I am using the wrong function to display the price?

    Thanks in advance for the help.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author WP Inventory

    (@chuck1982)

    Hello Willhouse,

    Can you please send this through either:

    1. Our website support forum here: https://www.wpinventory.com/support/support-request/

    or

    2. Via the “Support” tab within your plugin itself.

    We would be happy to assist you in getting this worked out.

    Thank you in advance,
    WPIM Team

    Thread Starter willhouse

    (@willhouse)

    About 4 weeks ago I sent an email using the option 2 provided…still no word on the mysterious wpinventory_the_price()

    If anyone happens upon this and is looking to customize the single item page you can try out my workaround:

    First, go to the “Display” settings in WP Inventory’s submenu and move “Price” to “Show in Detail”

    Next, copy and paste this in your custom view (hint: use the original single-item.php found in the “views” folder as your guide). CAUTION, only do this if you are comfortable with theme overrides and PHP. If you are not, contact the plugin author:

    <?php foreach($inventory_display AS $sort=>$field) { ?>
    				<div class="<?php echo $field; ?>">
    					<?php if ($display_labels) { ?>
    						<span class="wpinventory_label"><?php wpinventory_the_label($field); ?></span>
    					<?php }
    					wpinventory_the_field($field); ?>
    				</div>
    				<?php do_action('wpim_the_field_' . $field); ?>
    			<?php } ?>

    The above is the foreach that displays any fields you have set in the “Show In Detail” display (in my case I only used the price because that is all I needed but use whichever field suits your fancy). Then you can use any of the custom display functions found in single-loop-all-sample.php to further customize your page.

    It’s not as clean as being able to use wpinventory_the_price() but it does work: https://milkandhoneyvintagerentals.com/rentals/inventory/1940sredradio/

    Cheers!

    Plugin Author WP Inventory

    (@chuck1982)

    Hello Willhouse,

    Thanks for posting your solution. We replied to your email sent on June 12. Please keep in mind those support emails you send from the dashboard, have your license information in them. Which, you do not have. Support is for ACTIVE and paid members with us. Please consider purchasing a license.

    Thank you!

    Thread Starter willhouse

    (@willhouse)

    Hi Chuck,

    I never received the response sent on June 12th. Could you please post it here on the forum so I can check it out?

    Thank you,
    Richard

    Plugin Author WP Inventory

    (@chuck1982)

    Hi Richard,

    All that was said is that we were going to look into it (and we have) and will roll out the fix in the next dev. cycle. We have a release coming out at the end of this month. There was no release last month, so those changes are going to be rolled into this one.

    Thank you for your patience. We appreciate you addressing this issue to make it a better product.

    • This reply was modified 7 years, 4 months ago by WP Inventory.
    Thread Starter willhouse

    (@willhouse)

    Chuck,

    Sounds great! I’ll be on the lookout for the new release and will test the function when it comes out and post back here what I find out.

    Thanks for following up with me and for the great plugin.

    -Richard

    Thread Starter willhouse

    (@willhouse)

    I wanted to update my workaround because it turns out the “Show In Detail” display settings also effect the reservation email.

    I noticed that the reservation email that was being sent did not have the title of the item. However, when I dragged the “Name” field to “Show In Detail” and saved the settings the next test email had the name.

    So, anyone who is going to try the workaround BE AWARE that “Show In Detail” also controls the fields sent in the reservation email.

    -Richard

    Plugin Author WP Inventory

    (@chuck1982)

    Richard,

    This should be fixed as of 1.5.4. Can you confirm? And, if so, can you update this support thread to resolved?

    NOTE: Yes, you are correct, the reserve email uses the fields that are used on the inventory display settings page.

    Thanks!

    Thread Starter willhouse

    (@willhouse)

    Hi Chuck,

    I was able to test this today and the update worked great.

    I can confirm that wpinventory_the_price(); is now displaying the price.

    Thank you for following up.

    -Richard

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘wpinventory_the_price(); not displaying the price’ is closed to new replies.