Archived

This topic is now archived and is closed to further replies.

  • 0

Pagelines error with EasyDigitalDownloads : view_receipt


Question

Posted · Report post

Dear pagelines team,

 

first of all. Thank you so much for a very professional Wordpress framework. I really like using pagelines and cannot imagine, how I could survived in the past without it.

 

Now to my problem:

I have a shop plugin installed called EasyDigitalDownloads. Everything works great, except showing purchase receipts. I contacted the EasyDigitalDownloads support before and we came up with an issue, which is caused by the pagelines framework.

 

This is the support thread with EasyDigitalDownloads.

 

EasyDigitalDownloads provides the functionality to send a purchase receipt to your customers. Within that receipt, there is a link to the buyers receipt in html format.

 

This is an example.

 

As described in the support thread with EasyDigitalDownloads, the receipt has a warning in the header and footer area. Essentially, what EasyDigitalDownloads is doing: call to wp_head(); at the beginning and wp_footer(); at the end of the receipt.

 

When I change my theme to something else than pagelines, the receipt looks great. With pagelines, I get these weird warning messages. 

 

The guess from EasyDigitalDownloads: "My guess is that the theme is hooking in a function that fails when not viewing it from a normal template file."

 

I attached the template.php, which is used to generate the receipt in the browser. What can I do, to have the header and footer of my site displayed as well as the receipt itself.

 

I tried changing wp_head(); to get_header() and wp_footer() to get_footer(), but then I loose plenty of the receipt's styling.

 

System information:

 

 

### Begin System Info ###
 
## Please include this information when posting support requests ##
 
Multi-site:               No
 
SITE_URL:                 https://www.ipin.ibilities.com
HOME_URL:                 https://www.ipin.ibilities.com
 
EDD Version:              1.5.2
WordPress Version:        3.5.1
                         
PHP Version:              5.3.13
MySQL Version:            5.1.56-log
Web Server Info:          Apache
 
PHP Safe Mode:            No
PHP Memory Limit:         90M
PHP Post Max Size:        7M
PHP Time Limit:           30
 
WP_DEBUG:                 Disabled
 
WP Table Prefix:          Length: 10 Status: Acceptable
 
UPLOAD_MAX_FILESIZE:      7MB
POST_MAX_SIZE:            7MB
WordPress Memory Limit:   40MB
DISPLAY ERRORS:           On (1)
FSOCKOPEN:                Your server supports fsockopen.
 
ACTIVE PLUGINS:
 
Easy Digital Downloads: 1.5.2
Easy Digital Downloads - Software Licenses: 1.4.3
Easy Digital Downloads multilingual: 1.1.1
Installer: 0.5
Jetpack by WordPress.com: 2.2.2
Pagelines Sections: 1.0
Post Types Order: 1.5.7
WPML Multilingual CMS: 2.8.1
WPML Sticky Links: 1.3
WPML String Translation: 1.7
 
CURRENT THEME:
 
PageLines Framework: 2.4.1
 
### End System Info ###
 

 

template.php

Share this post


Link to post
Share on other sites

8 answers to this question

Posted · Report post

Hi Simon, thank you very much for your help.

I'm afraid to say, that this didn't resolve my problem completely, but you pointed me to the complete correct direction.

 

Strangely, the filter is not getting called, which I think is actually an issue with EDD, not Pagelines.

 

But I created a new page called "receipt", added the short code and within the email template from EDD I do the following now:

 

<a href="https://www.ipin.ibilities.com/receipt/?purchase_key={receipt_id}">Your receipt</a>

 

Whereas {receipt_id} get's replaced with the correct ID to view the purchase receipt on the page called "receipt".

 

I'm very happy! Thanks again. You have a great support team!

Share this post


Link to post
Share on other sites

Posted · Report post

Why do you need a php file?

 

They provide a shortcode that can go in any page: [edd_receipt]

Share this post


Link to post
Share on other sites

Posted · Report post

Hi Simon,

 

from your question, I think I need to clarify the question or issue with Pagelines framework:

 

As I mentioned above, EDD creates a purchase receipt email, which will be sent to our customer upon success purchase of a product. Within that email is a link to the respective purchase receipt.

 

This links goes to e.g. https://www.ipin.ibilities.com/?purchase_key=09b821bb0de483f80cf6b99fcc2b15d4&edd_action=view_receipt

(Copied from the generated email).

 

The php file is the method, which from my point of view gets called, as soon as the user clicks the link. And with the provided link above, you can see the result of that, which does not happen, if you use Twenty Elven or Twenty Twelve.

 

So I don't need the php file, but EasyDigitalDownloads does as well as our customers, who want to see their receipt without warnings in the header or footer area.

 

I'm looking forward to your feedback.

Share this post


Link to post
Share on other sites

Posted · Report post

Ok looked at it a bit more... pretty easy after i read their docs.

 

1. Create a new page and add the receipt shortcode [edd_receipt] and whatever else you want in the page. Make a note of the pages 'slug'

2. Add the following filter to either a child theme functions, or the customize plugins functions file.

 

add_filter( 'edd_email_template_tags', 'change_email_url' );
function change_email_url( $message ) {
    $url = str_replace( '?purchase_key', '/sample-page/?purchase_key', $message );
    return $url;
}
I highlighted the 'slug' i tested with on my install.

Share this post


Link to post
Share on other sites

Posted · Report post

Yea that was the other way ;) 

Share this post


Link to post
Share on other sites

Posted · Report post

Hi Frank,

 

 

All of the PageLines products are built according to WordPress API standards and do work with the majority of plugins out there. If the plugins author have informed you that the error is theme related, we will bring this to our developers attention, please bear in mind this is an advanced question and may take more time with a response.

 

Thanks for your patience.

Share this post


Link to post
Share on other sites

Posted · Report post

Hi Danny,

did you find any solution for that?

Share this post


Link to post
Share on other sites

Posted · Report post

We apologize for the delay, we have alerted our developer, however there may be a delay in response.

Share this post


Link to post
Share on other sites