Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › eStore – Variable product_ID and category_ID possible?
Tagged: category sort
- This topic has 5 replies, 3 voices, and was last updated 10 years, 11 months ago by StarCircleAcademy.
-
AuthorPosts
-
February 6, 2013 at 11:44 pm #8515geiselbMember
I am a new user of WP eStore, upgrading from your WP Simple Paypal Shopping cart.
Before I begin adding products and pages, I would like to better understand how to do a couple of things that I have not yet found documentation or forum entries on.
I have a collection of products in a number of categories along with a couple of subscriptions that I would like to build.
I expect that I will have at a minimum separate pages for a list of categories and then the list of products under each category. what I would like to know is if it is possible to define a single page to display the products in a category with the specific category ID passed to that page when linking from the list of categories page. An additional expected use is to be able to do this from a product summary in a list linking to a detailed product page. In other words I would like to be able to define one page for product detail and use the product ID linked from the product summary page.
In short code I would think that might work something like this:
[wp_eStore_product_details id=varProductID info=”name”]
In other words, can the product ID or category ID be variable? Could you use JavaScript within the short code to get that information? Can that information be made available based on which product or category selected from a separate page – maybe via URI parameters? Can this be done in the PHP instead?
I’m fairly new to WordPress and PHP so I am not sure how much of this is capable with WP eStore.
Thanks for any help.
—
Regards, Brian
February 7, 2013 at 6:30 am #53671adminKeymasterHi Brian, Maybe this eStore addon will help:
http://www.tipsandtricks-hq.com/ecommerce/wp-estore-browse-products-by-category-addon-2056
You won’t be able to use dynamic variables like you mentioned in the shortcode but we have corresponding PHP functions for most of the shortcodes where you could use it. If you have a particular template file in your theme, you can use the PHP function in that template file to dynamically show details the way you want to. Basically, you would pass the variables via URI parameters then read it in your template file and pass it to the eStore function that you are calling. This can get a little complex if you are not a developer so I would suggest using the above mentioned addon.
February 7, 2013 at 10:37 pm #53672geiselbMemberthanks for the tip. This add-on is exactly what I’m looking for in order to simply browse/present the products by categories. Think I’ll hold off on the URI query coding for now. Interestingly enough, I see that the plug-in developer of this eStore add-on used URI query parameters.
November 21, 2013 at 3:11 am #53673StarCircleAcademyMemberIs there a way to add a custom sort of categories? I’d like to sort my items by one of:
Date / time
Title [already supported via the shortcode]
Availability
I’m using the category method to display “Webinars” on this page:
[http://starcircleacademy.com/webinars]
I’d like to also sort by the date of the webinar, and whether or not it’s sold out (inventory = 0)
Ideally the *customer* could click a button to sort by title, too.
I realize that “date” is a not a something that exists at present so my work around is to change the item name to start with the date in yyyy-mm-dd format. That’s OK, but not completely friendly since I put the date in the description.
November 21, 2013 at 11:04 pm #53674adminKeymasterIf you sort by ID, you would probably get the same result as sorting by date. A separate date field usually doesn’t make sense for a product. The ability to sort by available quantity can be added. This for the manage products interface correct?
December 10, 2013 at 2:16 pm #53675StarCircleAcademyMemberSorry for not replying sooner. I agree a “date field” doesn’t make sense for generic products, but I was thinking more along the lines of a separate free format field that can be sorted. Could be, for example, “Artist” or “Author” or “T-Shirt Color” or any of a number of attributes that might make sense to sort for a given type of product. Sorting by date would then, hopefully, come for free.
-
AuthorPosts
- You must be logged in to reply to this topic.