Jump to content

Stock display without foreach?


KyneticWeb

Recommended Posts

Hey guys, I am hoping someone can throw a solution my way on this.

 

I know you can use this statement:

{foreach key=num item=productgroup from=$productgroups}

 

..and it will work properly to show:

{if $product.qty!=""}<em>({$product.qty} {$LANG.orderavailable})</em>{/if}

 

Problem is, we have a fully customized cart page.. thus we are not needing the foreach statement. We are simply looking to add the {$product.qty} with a per product basis. Anyone know if there is an {if} statement that will work here?

 

Thanks for any help provided.. means a lot!

Link to comment
Share on other sites

perhaps try the data feed I wrote last November for another user...

 

http://forum.whmcs.com/showthread.php?95254-Out-of-stock-message-in-template-file&p=399642#post399642

 

you should be able to use it anywhere by just calling the PID for the particular product - though you may need to modify its output for your own needs... let me know if you run into any issues with it.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated