Post by rph » Mon Jan 09, 2012 3:18 am

Can't reproduce it. I'm guessing you've made changes somewhere that caused it.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by daggerman1 » Mon Jan 09, 2012 6:40 pm

rph wrote:Can't reproduce it. I'm guessing you've made changes somewhere that caused it.
Thanks again for replying, what files would effect this and how does it check if it has been used by another customer?

Dan

Newbie

Posts

Joined
Sat Jan 07, 2012 6:53 pm

Post by eka7a » Tue Jan 10, 2012 12:34 am

No problem with the php mail but Turkish character error smtp email is selected

Attachments

smtp-mail.png

smtp mail error - smtp-mail.png (25.29 KiB) Viewed 4958 times


Windows 11 Pro Digital License Key


User avatar
Active Member

Posts

Joined
Sun Apr 12, 2009 12:59 am
Location - Türkiye

Post by opmods » Tue Jan 10, 2012 12:39 am

typo with extention page ( http://www.opencart.com/index.php?route ... on_id=2184 ) of opencart in extention page which is "Exension Name"

Newbie

Posts

Joined
Tue Dec 20, 2011 7:51 pm

Post by Daniel » Tue Jan 10, 2012 2:35 am

opmods wrote:typo with extention page ( http://www.opencart.com/index.php?route ... on_id=2184 ) of opencart in extention page which is "Exension Name"

ok fixed.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by SelfMan » Tue Jan 10, 2012 9:36 am

Partially fixed by qphoria in http://code.google.com/p/opencart/sourc ... n791&r=760

The problem continues within the $output .= '<description>'...

The product description itself contains some html. Central european characters are encoded as &aacute; Which the feed cant handle. I've tried to apply the html_entity_decode function to the description field, but then other error popped up, like &nbsp; not beeing a valid anchor. (I've used the google)base.php from thetrunk).

The live error can be seen here: http://www.somarinky.sk/index.php?route ... oogle_base

I think that the cause is some multi-leveled entity encoding.

New member

Posts

Joined
Thu Dec 01, 2011 8:01 am

Post by eka7a » Tue Jan 10, 2012 11:41 pm

SelfMan wrote:Partially fixed by qphoria in http://code.google.com/p/opencart/sourc ... n791&r=760

The problem continues within the $output .= '<description>'...

The product description itself contains some html. Central european characters are encoded as &aacute; Which the feed cant handle. I've tried to apply the html_entity_decode function to the description field, but then other error popped up, like &nbsp; not beeing a valid anchor. (I've used the google)base.php from thetrunk).

The live error can be seen here: http://www.somarinky.sk/index.php?route ... oogle_base

I think that the cause is some multi-leveled entity encoding.
your google_base.php file change
http://opencart.googlecode.com/svn/trun ... e_base.php

Windows 11 Pro Digital License Key


User avatar
Active Member

Posts

Joined
Sun Apr 12, 2009 12:59 am
Location - Türkiye

Post by SelfMan » Wed Jan 11, 2012 1:06 pm

eka7a wrote:
SelfMan wrote:Partially fixed by qphoria in http://code.google.com/p/opencart/sourc ... n791&r=760

The problem continues within the $output .= '<description>'...

The product description itself contains some html. Central european characters are encoded as &aacute; Which the feed cant handle. I've tried to apply the html_entity_decode function to the description field, but then other error popped up, like &nbsp; not beeing a valid anchor. (I've used the google)base.php from thetrunk).

The live error can be seen here: http://www.somarinky.sk/index.php?route ... oogle_base

I think that the cause is some multi-leveled entity encoding.
your google_base.php file change
http://opencart.googlecode.com/svn/trun ... e_base.php
That is the partially fixed version from qphoria which I've used and the error is present.

New member

Posts

Joined
Thu Dec 01, 2011 8:01 am

Post by ADD Creative » Sat Jan 14, 2012 2:07 am

Daniel wrote:
clorne wrote:v 1.5.1.3 and 1.5.1.3.1 - Linux and Windows servers
Images not displaying in emails for Newsletter, Vouchers and order confirmations.

I am curious as to why this issue has not been reported here before but perhaps it has and I have missed it, if this is the case I apologise in advance.

Images will not embed in emails because of a typo in \system\library\mail.php on about line 140

The MIME content type reads application/octetstream and should be application/octet-stream
also the Content-Disposition: attachment; should read basename($attachment['file']) and not basename($attachment['filename']) as filename in this instance is often md5 encoded.

try the svn version.

i'm thinking to get rid of embedded images as to many email clients are having problems.
Changing the MIME content type from octetstream to octet-stream by doing the following allows later versions of Thunderbird to display embedded images.

In \system\library\mail.php

Find and change:

Code: Select all

$message .= 'Content-Type: application/octetstream; name="' . basename($attachment['file']) . '"' . $this->newline;
to

Code: Select all

$message .= 'Content-Type: application/octet-stream; name="' . basename($attachment['file']) . '"' . $this->newline;
Or setting the correct MIME content type for an image can be done by doing the following.

In \system\library\mail.php

Find and change:

Code: Select all

$message .= 'Content-Type: application/octetstream; name="' . basename($attachment['file']) . '"' . $this->newline;
to

Code: Select all

if ($size = @getimagesize($attachment['file']))
	$message .= 'Content-Type: ' . $size['mime'] . '; name="' . basename($attachment['file']) . '"' . $this->newline;
else
	$message .= 'Content-Type: application/octet-stream; name="' . basename($attachment['file']) . '"' . $this->newline;
This may help embedded images to show in other email clients.

Corrected missing - from last section of code.
Last edited by ADD Creative on Mon Jan 16, 2012 5:54 pm, edited 1 time in total.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by SelfMan » Sat Jan 14, 2012 7:11 pm

I confirm that the propper MIME type is application/octet-stream and not application/octetstream.
http://www.feedforall.com/mime-types.htm

New member

Posts

Joined
Thu Dec 01, 2011 8:01 am

Post by martinkong » Sun Jan 15, 2012 12:49 pm

Email generated by system/library/mail.php is missing a newline between header and content body, this causes some mailer processors (e.g. antivirus scanner) to reject the email.

In system/library/mail.php, change

Code: Select all

$header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline; 
to

Code: Select all

$header .= 'Content-Type: multipart/related; boundary="' . $boundary . '"' . $this->newline . $this->newline;
solves the issue.

Newbie

Posts

Joined
Sat Jan 14, 2012 1:26 pm

Post by TraderDan » Mon Jan 16, 2012 9:32 pm

The 'Required' setting that is accessible via Catalog -> Products -> Edit -> Option tab always reverts to "No" when you go to edit a product.

In other words, you can save it as "Yes" and it does save properly (and works fine), but as soon as you go to edit the product, the form always reverts back to "No", and unless you remember to manually choose "Yes" every time before saving, the 'Required' setting winds up as "No" every time.

Image


User avatar
New member

Posts

Joined
Thu Oct 27, 2011 10:44 pm
Location - Lawrence, MA

Post by Daniel » Mon Jan 16, 2012 11:35 pm

for people with mail problems try the latest mail class from the svn.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by hcosgun » Tue Jan 17, 2012 6:08 am

Hi all,

I have found that an admin user can define recursive category - subcategory relation in Admin-catalog-Categories page. In my opinion, Category Form-Data shouldn't allow selecting a category's subcategory as that category's parent.

Sometimes if you select recursive category-parent_id, both categories are disabled.

Newbie

Posts

Joined
Tue Jan 17, 2012 6:03 am

Post by fido-x » Tue Jan 17, 2012 9:53 am

Did you enable the product?

When you copy a product, it's default status is "Disabled". Unlike when creating a new product, where the default status is "Enabled".

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by jpsurese » Tue Jan 17, 2012 2:24 pm

I am working on a website where we need to accept file upload from the customer while taking orders.
I added an option of type File. It works fine, the user uploads the file and is there in the database and can be manually retrieved from the download folder of opencart.
So far so good.
In Adminsistration I view the details of the order
http://localhost/servicecart/admin/inde ... order_id=1

Now I try to download the image the customer had uploaded, by clicking on the link on the products tab of the order info.

http://localhost/servicecart/admin/inde ... ption_id=1

And then I get this error.
Fatal error: Call to undefined method ModelSaleOrder::getOrderOption() in D:\wamp\www\servicecart\admin\controller\sale\order.php on line 1783

I go to Model\Sale\Order.php and I find there is no function of that signature

I am now creating a new function

Code: Select all

ModelSaleOrder::getOrderOption($order_id, $order_option_id)
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "order_option WHERE order_id = '" . (int)$order_id . "' AND order_option_id = '" . (int)$order_option_id . "'");

		return $query->rows;
	}
Now I get an error and I fix it by removing the cast to int

Code: Select all

$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "order_option WHERE order_id = " . $order_id . " AND order_option_id = " . $order_option_id );
Now I get rows.
I do

Code: Select all

Print_r($option_info);
after

Code: Select all

$option_info = $this->model_sale_order->getOrderOption($this->request->get['order_id'], $order_option_id);// line 1783 controller/ order.php
I find the details are correct.
But I cannot still download the file.
It says page now found and the Notice is Undefined index type ( though the print_r shows the type as file)
error_downloadingFile.jpg

My error page ( while trying to download file in admin/ order_info) - error_downloadingFile.jpg (71.04 KiB) Viewed 5371 times

Please suggest what to do.

Attachments

product_option_file_issue.JPG

The issue from the start - product_option_file_issue.JPG (124 KiB) Viewed 5371 times

Last edited by jpsurese on Tue Jan 17, 2012 6:14 pm, edited 1 time in total.

Newbie

Posts

Joined
Tue Jan 17, 2012 1:34 pm

Post by jpsurese » Tue Jan 17, 2012 6:08 pm

Well I find obviously the file has an extension added by random while uploading and the issue is linked to the handling of the same. Could some one help me there?

Newbie

Posts

Joined
Tue Jan 17, 2012 1:34 pm

Post by ADD Creative » Tue Jan 17, 2012 7:13 pm

Daniel wrote:for people with mail problems try the latest mail class from the svn.
Just tried the latest from the svn and the image still does not display in Thunderbird 9.0.1 for Windows and Mail 3.6 for Mac OS X.

Looking at the email source I can see that the Content-Disposition is still wrong.

Code: Select all

Content-Disposition: attachment; filename="1877662a783de334bfb89794d06334c0"
As this post http://forum.opencart.com/viewtopic.php ... 20#p234875 stated.

Code: Select all

$message .= 'Content-Disposition: attachment; filename="' . basename($attachment['filename']) . '"' . $this->newline;
needs changing back to

Code: Select all

$message .= 'Content-Disposition: attachment; filename="' . basename($attachment['file']) . '"' . $this->newline;
which is how it was in version 1.5.1.2.

Or setting the correct MIME content type for an image will also allow images to display.

Code: Select all

Content-Type: image/png; name="logo.png"
Find and change:

Code: Select all

$message .= 'Content-Type: application/octet-stream; name="' . basename($attachment['file']) . '"' . $this->newline;
to something like

Code: Select all

if ($size = @getimagesize($attachment['file']))
	$message .= 'Content-Type: ' . $size['mime'] . '; name="' . basename($attachment['file']) . '"' . $this->newline;
else
	$message .= 'Content-Type: application/octet-stream; name="' . basename($attachment['file']) . '"' . $this->newline;
Ether method will allow images to display in Thunderbird and OS X Mail.

Update: All the above also applies to Hotmail webmail in IE but not when using Firefox, which is very confusing.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by Daniel » Wed Jan 18, 2012 1:13 am

and what happens if the filename has spaces or funny characters in the name.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by ADD Creative » Wed Jan 18, 2012 2:22 am

Spaces and funny characters, expect a question mark, were fine in Thunderbird, Mac OS X Mail and Hotmail. As long as the filename ended in .png the image was displayed.

I believe that the filename parameter should be in US-ASCII so something like

Code: Select all

$message .= 'Content-Disposition: attachment; filename="' . preg_replace('/[^A-Z0-9\._-]/i', '', basename($attachment['file'])) . '"' . $this->newline;
would be correct.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom
Who is online

Users browsing this forum: No registered users and 37 guests