Last update changed product types?

Thorworx

11 Mar, 2013 04:38 PM

We have a small shop (only 3 products).
All products were set up as Virtual products – NOT downloadable products. These are submission fees.

As far as we can tell, everything was working fine until the last jigo update… (8 March?)
Now, all products are still Virtual products according to product in admin, however, In the order confirmation e-mail that the customer receives, there is a link included to download a non-existent file.

  1. 2 Posted by Thorworx on 13 Mar, 2013 09:39 AM

    I can’t believe this not an issue for more people.

    The jigoshop_emails.php file does not seem to do a proper check for product type?
    I’ve edited “jigoshop_emails.php”

    and commented out the lines (in 2 places):

    // $download_links = apply_filters('jigoshop_download_links_on_invoice',true);
    

    Obviously this will only work if a shop ONLY has Virtual products/subscriptions..

    … but for shops that have BOTH virtual and downloadable products, this hack will eliminate the links to the downloadable products.

  2. 3 Posted by Thorworx on 17 Mar, 2013 11:55 AM

    Update: The attempted fix above did not work.

    Order confirmation e-mails are STILL including NON-existent download links to virtual products.

    Does anyone have any ideas on this?

  3. 4 Posted by birchallchris on 24 Mar, 2013 07:43 PM

    You can edit this in jigoshop_order.class.php:

    if ( ($_product->is_type('downloadable') || $_product->is_type('virtual')) ) :
        if ( (bool) $item['variation_id'] ) {
            $product_id = $_product->variation_id;
        } else {
            $product_id = $_product->ID;
        }
        if ( $this->get_downloadable_file_url( $product_id ) )
            $return .= PHP_EOL . __('Your download link for this file is:', 'jigoshop');
            $return .= PHP_EOL . ' - ' . $this->get_downloadable_file_url( $product_id ) . '';
    endif;
    

    But edits to the core code are overwritten on update… I can’t think of another way to solve this.

  4. 5 Posted by robcraver on 25 Mar, 2013 06:29 AM

    SAME Problem here…. My client is pissed! I am at on my last leg! any updates on why this is happening??

  5. Support Staff 6 Posted by Jeff on 25 Mar, 2013 06:41 PM

    Jeff's Avatar

    Hello folks, I’ve been alerted to this discussion. Bear with me while I try to sort it out. I’ve edited a couple of posts in this thread to get the code to show up better.

    @Thorwox — that line of code you are commenting out does absolutely nothing. I’m trying to ascertain why it was even put in there by another, but at the moment it has no effect on anything.

    @birchallchris — your provided code block has been in Jigoshop for almost a year now. Yes, virtual products can have a download link … and this has been this way for a long time now.

    So I guess what I’m trying to decide … is why all of a sudden this is a problem? Nothing has been changed for quite some time that I can recall.

    Certainly though … at the moment I see no means of providing a link to a virtual product in the Admin when editing products. Confusing, and I’m looking into it. If anyone has anything to add, it may help.

    But the plan has always been … that virtual products could have a download link.

  6. 7 Posted by robcraver on 25 Mar, 2013 06:59 PM

    @ jeff – then what is the difference between the downloadable product type and virtual product type?

    From my understanding the virtual product should be the same as the simple product but does not charge shipping…

    I think if you add the function that the virtual product can have a file or and URL field to direct the purchaser to paid site content

    Other wise it is identical to a downloadable product type… making it pointless…

  7. 8 Posted by Thorworx on 25 Mar, 2013 07:16 PM

    Downloadable is working fine, you enter the product and specify a link to the file… link gets included in the e-mail to the buyer. Works great for .mp3s, etc.

    But a “Virtual” product should NOT have a link. It would be used for: services, submission/sign up fees, class registrations, etc. i.e, It is virtual by definition.

    The code simply needs to include a check for product_type = virtual, and if true, NOT include the link in the order confirmation e-mail.

Reply to this discussion

Internal reply

Formatting help or Preview

Attached Files

You can attach files up to 10MB

If you don’t have an account yet, we need to confirm you’re human and not a machine trying to post spam.