Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author nvaughan84

    (@nvaughan84)

    Hi there,

    thanks for your comment.

    The Free version is meant as a ‘taster’ and offers limited functionality. The paid for version allows you to select any product from your inventory. Also, the banner is removed in the paid for version πŸ˜‰

    Cheers

    Plugin Author nvaughan84

    (@nvaughan84)

    Cool, glad that’s now working.

    Let me know if you have any other issues.

    Cheers,

    Nick

    Plugin Author nvaughan84

    (@nvaughan84)

    Hi there,

    sorry for the (long) delay in replying to your post.

    I’ve made an update to the plugin which should fix those 2 bugs.

    I’ll be making more regular updates so if you spot anything else let me know.

    Cheers,

    Nick

    Forum: Fixing WordPress
    In reply to: query_posts() help
    Thread Starter nvaughan84

    (@nvaughan84)

    There can be a few posts with the same packageID (so 4 posts with packageID = 1, 6 posts with packageID = 2 and 8 posts with packageID = 3)

    No, I don’t think pagination is necessary.

    Is there a way to get the SQL statement that the query_posts() function generates? I could then use this and amend it to create my own

    Thanks for your help πŸ™‚

    Forum: Fixing WordPress
    In reply to: query_posts() help
    Thread Starter nvaughan84

    (@nvaughan84)

    Hi there,

    thanks for the suggestion but no luck unfortunately.

    Yep, packageID is a meta_key with a value of 1,2 or 3.

    I need the posts to display with packageID’s 3 first, followed by 2 and finally 1. Within these groups of 3,2 and 1 I need the posts to be random.

    It nearly works but is showing them in the wrong order (packageID 1, 2 and then 3) and the order=DESC doesn’t have any affect

    Thread Starter nvaughan84

    (@nvaughan84)

    If I were to use Custom Post Types then could I store the additional data in it’s own table rather than use wp_postmeta?

    For example a product might have the following attributes associated with it: size, brand, weight etc,

    With custom post types it’s normal to store this additional data in the wp_postmeta table with a reference to the wp_post id. I would rather keep this data separate from the wp_postmeta. Is this possible? How would I add the additional fields to the admin panel and save them in a table other than wp_postmeta?

    Thanks for your help

    Thread Starter nvaughan84

    (@nvaughan84)

    I was planning on storing the url as a slug in the database so each product would have a unique slug.

    I was then going to check the URL to see if this matched with a slug from the products table and if so load the associated product.

    eg http://www.mysite.com/products/small-box-of-chocolates

    this would then match with a slug in the products table small-box-of-chocolates.

    At this point I could load a template within the theme directory which would contain code to look up the relevant product (with slug small-box-of-chocolates) and display it’s data.

    Can I use pre_get_posts() to do this? If there’s a match between URL and a product slug then I need to to load the product.php template file located in the theme directory

    Thread Starter nvaughan84

    (@nvaughan84)

    Hi there,

    yeah, products.php would be a theme template that is loaded if the url/slug refers to a product type (rather than a post). Within this product template I could then pull the specific product information from the product table.

    Cheers,

    Nick

    Thread Starter nvaughan84

    (@nvaughan84)

    I basically want it to store products in a database. There will be a table for products, one for categories and one to associate products with one or more categories.

    There will be a function within the plugin to list categories. Clicking a category will list it’s products and clicking a product will show it’s details.

    The only thing I’m struggling with is, when a product is clicked, getting the url and comparing it with the slug of a product. It will then load a product template and load the product details.

    I guess I’m asking, at what point does wordpress get the url and determine whether it’s a page, post or whatever or whether to load 404.php. It’s at this point I can say ‘also check my table to see whether the url (slug part) belongs to a product. If so, load template product.php’

    Cheers

    Thread Starter nvaughan84

    (@nvaughan84)

    The main thing is the ability to read the url and use this to search the products table. If it finds a matching slug in the products table it will load a template. Within that template I could then display the product details based on the slug

    Thanks πŸ™‚

Viewing 10 replies - 1 through 10 (of 10 total)