Home Forums WC Vendors Free Support [Resolved] Applying shop template to attribute taxonomies.

NOTICE: We've Moved to a Ticket System for Support

As of August 31, 2017 (12am EST) our support forums will be retired (read-only), and we will be moving to a support ticket system.  This will allow us to better organize and answer support requests, and provide a more personalized experience as we assist our customers.

For the time being, we will leave our forums open for reading and learning while we work on creating a more robust Knowledge Base for everyone to use.

If you are a WC Vendors Pro customer please open a support ticket here. 

If you are a WC Vendors user please open a support ticket on the Wordpress.org forums.

The information on this forum is outdated and in most instances no longer relevant. Please be sure to check our documentation for the most up to date information.

https://docs.wcvendors.com/

Thank you to all of our customers!

 

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #124
    barrycockcroft
    Participant

    I hope the preparations are going well for the changeover!

    I was hoping you might be able to point me in the direction of a way to apply the woocommerce standard shop template to other pages, just like the individual vendors pages use the shop template.

    I am using product attributes to help classify my products and want to use the custom taxonomy archives with the standard shop template. At the moment they inherit some other layout template.

    Thanks for any assistance.

    regards,

    Barry

    #125
    WC Vendors Support
    Participant

    The first release is nearly done. Jamie has been doing 99.9% of the work on it so far cleaning things up that he knows needed doing and adding all the new shortcodes and widgets.

    I’m not quite sure I understand your question, about page templates. The vendor templates use Woo’s archive-product.php. If you wanted a custom taxonomy archive, you’d have to find what template the page you want to modify is using, and then work on editing that template in your themes directory.

    http://codex.wordpress.org/Template_Hierarchy <-- has a list of all the templates that WordPress uses and how it determines which is called by what.

    #126
    Jamie
    Keymaster

    Hi Barry,

    If I understand what you want is the template that you can control for each of your Product Attributes.

    You can create your own templates for each of your attributes by having a filename in the following scheme

    taxonomy-pa-attributename.php

    For instance if you have a product attribute called color the template for it would be

    taxonomy-pa-color.php

    You can make those templates duplicate any of the woocommerce templates by just copying the code over.

    cheers,

    #128
    barrycockcroft
    Participant

    Thanks for your replies.

    I have created a taxonomy-pa-attributename.php which works fine except that it displays only the main content and no headers, footers and other page elements. I am unsure as to how to bring in these other elements the same as the standard woocommerce archive page which is also used by the page which displays vendors products.

    Which code exactly do I copy over and from where to create the same layout as the main woocommerce shop page? Thanks for any assistance.

    regards,

    barry

    #131
    Jamie
    Keymaster

    Hi Barry

    I just checked my taxonomy file and all I have in mine is the following.


    if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

    woocommerce_get_template( 'archive-product.php' );

    cheers,

    #136
    barrycockcroft
    Participant

    Thanks again,

    Yes I have this taxonomy file copied over and it does not pull the other templates (header, footer etc).

    Just one last thing on this topic as I still can’t get it working (nor could a developer on codeable.io).

    Could you please tell me which template in the Vendor plugin is used to display the individual vendor products? If this is a taxonomy too then I could try copying the code from this Vendor template and applying to my own custom taxonomies and woo attributes. I have looked through the plugin files and can’t see which is the main display for vendor product pages.

    Thanks again,

    Barry

    #166
    WC Vendors Support
    Participant

    The vendors shop page is displayed using archive-product.php.

    Individual product pages use the single-product.php

    Remember if your adding your own templates, they go in the /wp-content/themes/YOURTHEME/woocommerce/ folder.

    #224
    barrycockcroft
    Participant

    Thanks Ben & Jamie,

    This issue is now sorted but it was a bit complicated. Copying over the archive-product.php brought up products only no header or footer so I had to recreate the template for the custom taxonomies. It works now.

    Thanks for your help.

    Barry

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘WC Vendors Free Support’ is closed to new topics and replies.