Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › Inventory Control Text
- This topic has 3 replies, 2 voices, and was last updated 13 years ago by admin.
-
AuthorPosts
-
November 9, 2011 at 6:08 am #4719kmk293Member
I’ve incorporated a rating system into each of my products. Each time a product is purchased, the buyer is sent an email to the rating page where they can rate it on a 5 star scale. In order to display the rating of this product on another page, i use a shortcode (GD star rating plugin). I wanted to display this rating on multiple pages:
1) On the actual product page where I am using the Fancy 2 display
2) On the category page where I am using fancy 1,
3) On the product search page
I’ve modified the fancy1 code and the search code so that the only thing displayed on these pages is the Product Page Link and the rating. The fancy 2 remained unmodified and will display all the information.
In order to accomplish this I needed a custom field to put this rating shortcode so I could output it on each display. Since this wasn’t an option I was putting the shortcode into the “Inventory Control > Available Copies” field and was outputting the available copies into each display. (I am selling digital products so I’m not using this function).
All was working perfectly until I tested buying one of the products…the field was reset to blank and the rating was gone from each of the displays.
How can I modify the code so that when a non-number is entered into this field, the inventory control reduction is turned off and the text will still remain after the product is purchased?
Thanks so much for all your support on this wonderful plugin!
November 9, 2011 at 10:35 pm #38290adminKeymasterYou can’t use the inventory control fields for this. Use the description field instead. You can place your rating shortcode inside the product description field and it will show up when the product is displayed using a fancy display that shows the description.
November 9, 2011 at 11:30 pm #38291kmk293MemberI was afraid you’d say that…I have other product information in the description field that I do not want displayed in the Fancy1 or search functions, which is why I needed a “custom field” much like in eMember. Since this option isn’t available in eStore i figured I would look for a field that I wasn’t using and inventory control was the only one. This seems like it should be pretty simple to fix, just an if statement to output the current value if the data entered into that field is not a number. Am I wrong about that?
November 10, 2011 at 4:15 am #38292adminKeymasterThere are too many places where you would have to change that. I think a better option is to have a separate post or page for each of your products and then place the rating on that post or page. This gives you the flexibility to add whatever you want on that page for the product and then the fancy display can link to the detailed post or page for the product. This concept is explained here:
-
AuthorPosts
- You must be logged in to reply to this topic.