WordPress.org

Ready to get started?Download WordPress

Forums

Attachments
[resolved] Attachments not working for Products in WP-Ecommerce (17 posts)

  1. lord_dev
    Member
    Posted 2 years ago #

    I am using the WP Ecommerce plugin and the Attachments plugin. I want to be able to attach files to the products in WP Ecommerce. This should be do-able as the 'Attachments' tab appears in the admin. However, once a file has been uploaded I cannot see the 'Attach' button.

    Anyone else have this problem/knows of a fix?

    http://wordpress.org/extend/plugins/attachments/

  2. Jonathan Christopher
    Member
    Plugin Author

    Posted 2 years ago #

    Have you enabled support on Products pages by checking the box next to "Products" when viewing Settings > Attachments in the WordPress admin?

  3. lord_dev
    Member
    Posted 2 years ago #

    Yes...

    I can see the Attachments box in the Products admin page and I am able to upload a file. However, once the file is uploaded it does not give me the option to 'Attach' the file to the product. It works and appears for Pages and Posts, but just not for Products.

    I am using Wordpres 3.31, WP Ecommerce 3.8.7.5 and Attachments 1.6

    Thanks in advance.

  4. Jonathan Christopher
    Member
    Plugin Author

    Posted 2 years ago #

    I see, I've just installed the plugin to see what it's doing and it's conflicting with what Attachments is attempting to do. I will see if it's possible to implement a fix but likely won't be able to take the time to do so very quickly as the WP Ecommerce codebase is quite large.

  5. lord_dev
    Member
    Posted 2 years ago #

    Thanks for your help jchristopher, please let me know if there is anything I can do to help?

    My client has requested this feature and your plugin does the best/only job i've seen. Looking forward to seeing the fix!

  6. lord_dev
    Member
    Posted 2 years ago #

    Hey jchristopher,

    If a fix is not found, do you know which version of WP-Ecommerce will work with this plugin?

    Thanks in advance.

  7. Jonathan Christopher
    Member
    Plugin Author

    Posted 2 years ago #

    I have not had time to look into WP E-commerce yet and my schedule is quite booked, it will likely take a number of weeks before I'm able to find out how to integrate with the plugin. I'm not sure which version if any it will work with.

  8. lord_dev
    Member
    Posted 2 years ago #

    Hey,

    I would just like to contribute my solution:

    Follow these two tutorials: #1 explains the solution but #2 has the working code!

    1) http://bloke.org/php/wp-ecommerce-product-downloads-checking/

    2) http://automatica.com.au/2011/12/wp-ecommerce-downloads-and-bypassing-the-checkout-process/

  9. Jonathan Christopher
    Member
    Plugin Author

    Posted 2 years ago #

    This has been fixed in version 1.6.1 available now.

  10. hubb7
    Member
    Posted 1 year ago #

    Having the same problem within the Edit Products area of the WP e-Commerce plugin.

    Is there something I've missed?

  11. Jonathan Christopher
    Member
    Plugin Author

    Posted 1 year ago #

    Which versions of WP, Attachments?

  12. hubb7
    Member
    Posted 1 year ago #

    WordPress Version 3.5

    Attachments Version 3.0.3

    Thanks Jon!

  13. Jonathan Christopher
    Member
    Plugin Author

    Posted 1 year ago #

    Interesting issue now fixed in 3.0.4. The problem came up because the author of that plugin is using a dash in the CPT name powering products. Under the hood WP converts that to an underscore so if you we're using the dashed version, the CPT names didn't match by the time everything ran. I implemented a fix for dashes so you should be good to go as of 3.0.4!

  14. Jonathan Christopher
    Member
    Plugin Author

    Posted 1 year ago #

    I've actually reversed this change in 3.0.5 sine you can in fact use dashes in CPT names. I'll check the database to see what WP e-Commerce is using.

  15. Jonathan Christopher
    Member
    Plugin Author

    Posted 1 year ago #

    The CPT name is wpsc-product so I must have hit a fluke somewhere, sorry about that. Is Attachments 3.0.5 working for you?

  16. hubb7
    Member
    Posted 1 year ago #

    When on the Edit Product page, I'm still not seeing the Attachments section on the page.

  17. Jonathan Christopher
    Member
    Plugin Author

    Posted 1 year ago #

    After checking things out, something wacky is going on with WP e-Commerce and the way it registers it's CPT, to fix the issue you'll need to support two post_type names. When registering your instance, make sure you've added both "wpsc-product" and "wpsc_product" - one seems to work when adding a new Product, and the other when editing an existing Product, e.g.

    'post_type' => array( 'wpsc-product', 'wpsc_product' ),

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic