Include images with product tag in Acymailing?

  • Posts: 202
  • Thank you received: 2
13 years 8 months ago #11111

I am looking at purchasing Acymailing to use alongside my Hikashop store. Does the Acymailing plugin allow for insertion of product thumbnails into the mailings? What information does the tag include? Can it be customized?

Thanks!!

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 8 months ago #11112

Yes, you will have the products thumbnails. Here is how it will look by default:
www.acyba.com/en/support/documentation/1...ashop.html#customize
There is also an explanation of the fields and how to customize the product information template.

Please Log in or Create an account to join the conversation.

  • Posts: 202
  • Thank you received: 2
13 years 8 months ago #11116

I am testing it right now with Acymailing Starter. When I insert a product tag, all I am getting is the product name and price, hyperlinked to the product on the website. Shouldn't it automatically insert the product image?

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 8 months ago #11119

Indeed. We just tested it and found that there was something missing in the code.
You need to edit the file plugins/acymailing/hikashop.php and replace the line:
$query = 'SELECT a.* FROM '.acymailing::table('hikashop_product',false).' as a LEFT JOIN '.acymailing::table('hikashop_file',false).' as b ON a.product_id=b.file_ref_id AND file_type=\'product\' WHERE a.product_id = '.$tag->id.' LIMIT 1';

by:
$query = 'SELECT b.*,a.* FROM '.acymailing::table('hikashop_product',false).' as a LEFT JOIN '.acymailing::table('hikashop_file',false).' as b ON a.product_id=b.file_ref_id AND file_type=\'product\' WHERE a.product_id = '.$tag->id.' LIMIT 1';

and that should fix the problem. On our end, that fixed it and we can now see the thumbnail of the products.

Please Log in or Create an account to join the conversation.

  • Posts: 202
  • Thank you received: 2
13 years 8 months ago #11121

Awesome! It's so nice to deal with a company that really stands behind it's product!!!

Please Log in or Create an account to join the conversation.

  • Posts: 202
  • Thank you received: 2
13 years 8 months ago #11122

Made the change in the prior post. Now, when I insert a product tag and try to preview the mailing, I am getting this error:

Fatal error: Call to undefined method plgAcymailingHikashop::escape() in /home/thegragp/public_html/storefront/plugins/acymailing/hikashop/hikashop.php on line 659

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 8 months ago #11124

We don't have such escape function on that line in that file on our end. Could you copy paste that line here ? (do you just the latest version of hikashop?)

Please Log in or Create an account to join the conversation.

  • Posts: 202
  • Thank you received: 2
13 years 8 months ago #11125

Here's the entire IF function, going from lines 656-663, with line 659 in bold:

if(empty($tag->type) || $tag->type != 'title'){
			if(!empty($product->file_path)){
				$image = hikashop::get('helper.image');
				[b]$result .= '<table class="acymailing_content"><tr><td valign="top" style="padding-right:5px"><a target="_blank" style="text-decoration:none;border:0" href="'.$link.'" >'.$image->display($product->file_path,false,$this->escape($product->product_name)).'</a></td><td>'.$description.'</td></tr></table>';[/b]
			}else{
				$result .= $description;
			}
		}

I just used the integrated upgrade function this morning. Running Hikashop 1.4.7 on Joomla 1.6

Please Log in or Create an account to join the conversation.

  • Posts: 202
  • Thank you received: 2
13 years 8 months ago #11126

Sorry, it didn't bold, but you can see the BBC code where I tried!

Last edit: 13 years 8 months ago by momentis. Reason: misspelling

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 8 months ago #11127

Please replace $this->escape($product->product_name) by $product->product_name
That's actually what we have on our end. It seems that we already corrected that since last release on our dev website.

Please Log in or Create an account to join the conversation.

  • Posts: 202
  • Thank you received: 2
13 years 8 months ago #11128

Almost there, but not quite. I see what is happening, though. My shop sits under a subdirectory of my main site. If you look at the code (from the email) pertaining to the image, you will see that the path for the link is correct, but the path to the image file source does not include the subdirectory 'storefront':

href=" www.thegragroup.com/storefront/index.php...11&mailid=18&subid=1 " ><img
src=" www.thegragroup.com/media/com_hikashop/u...nail/MILW_000016.jpg " alt="MILW_000016" height="20" width="150"
/></a></td><td></td></tr></table></div></p><img alt=""
src=" www.thegragroup.com/storefront/index.php...ts&mailid=18&subid=1 " border="0" height="1" width="50" />

Does that help?

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 8 months ago #11129

Please try to add the code:

$config =& hikashop::config();
$uploadFolder = ltrim(JPath::clean(html_entity_decode($config->get('uploadfolder'))),DS);
$uploadFolder = rtrim($uploadFolder,DS).DS;
$image->uploadFolder_url = str_replace(DS,'/',$uploadFolder);
$image->uploadFolder_url = JURI::base(true).'/'.$image->uploadFolder_url;

after the line:
$image = hikashop::get('helper.image');

in the plugin.

It seems that acymailing is not able to understand the path of the image when it parses the email...

Please Log in or Create an account to join the conversation.

  • Posts: 202
  • Thank you received: 2
13 years 8 months ago #11131

No again. Now it is pathing under administrator:

src=" www.thegragroup.com/storefront/administr...nail/MILW_000016.jpg "

Rick

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 8 months ago #11135

Please replace the line:
$image->uploadFolder_url = JURI::base(true).'/'.$image->uploadFolder_url;
by:
$image->uploadFolder_url = ACYMAILING_LIVE.$image->uploadFolder_url;

Please Log in or Create an account to join the conversation.

  • Posts: 202
  • Thank you received: 2
13 years 8 months ago #11137

You rock!! That did it! Is this something specific to my installation, or will these changes be made in your version? Just wondering for when I upgrade the component.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 8 months ago #11138

We will include these modifications as well.

Please Log in or Create an account to join the conversation.

Time to create page: 0.080 seconds
Powered by Kunena Forum