Jump to content



Photo
* * * * * 3 votes

[Contribution] iOSC - mobile version of OSC on your iPhone


  • Please log in to reply
1304 replies to this topic

#1301   Spiceupyour

Spiceupyour
  • Members
  • 33 posts
  • Real Name:Sam B
  • Gender:Male
  • Location:Toronto

Posted 24 July 2014 - 20:38

Hello rainer,

It me again with a small problem, I have added all the add-ons successfully to my mobile site and everything work OK, I am having a little trouble with the add-on for

send Html Welcome Email and invoice

 

The email invoice and welcome are both perfect when account is created and order made from mobile site just that the pictures /background do not show due to wrong link address

It should look like

mysite.com/test/catalog/images/4105_wt.jpg  but is like below
mysite.com/test/catalog/mobile/www.mysite.com/test/catalog/images/4105_wt.jpg

 

I just can not figure out were to edit this duplicate info, I want to either take picture from mobile directory or store directory, why is it taken from both?

I am not sure if you can help me with this but I thought before I rip everything out I should ask you :)

 

you can look at the screen shot below

http://www.spiceupyo...email_error.jpg

 

Thanks

Sam


Edited by Spiceupyour, 24 July 2014 - 20:43.


#1302   raiwa

raiwa
  • Community Sponsor
  • 452 posts
  • Real Name:Rainer Schmied
  • Gender:Male
  • Location:Sant Iscle de Vallalta, Barcelona, Spain

Posted 25 July 2014 - 06:23

Hello rainer,

It me again with a small problem, I have added all the add-ons successfully to my mobile site and everything work OK, I am having a little trouble with the add-on for

send Html Welcome Email and invoice

 

The email invoice and welcome are both perfect when account is created and order made from mobile site just that the pictures /background do not show due to wrong link address

It should look like

mysite.com/test/catalog/images/4105_wt.jpg  but is like below
mysite.com/test/catalog/mobile/www.mysite.com/test/catalog/images/4105_wt.jpg

 

I just can not figure out were to edit this duplicate info, I want to either take picture from mobile directory or store directory, why is it taken from both?

I am not sure if you can help me with this but I thought before I rip everything out I should ask you :)

 

you can look at the screen shot below

http://www.spiceupyo...email_error.jpg

 

Thanks

Sam

 

 

Hello Sam @Spiceupyour,

 

In includes/languages/english/create_account.php and includes/languages/english/checkout_process.php

 

find this part:

define('VARTABLE1', '<table width="100%"  border="0" cellpadding="0" cellspacing="0" bgcolor="' . COLOR_TOP_EMAIL . '"   background="'. HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_IMAGES . BG_TOP_EMAIL . '" >

the constant "DIR_WS_IMAGES" is defined different on the mobile site to show the images in the main image folder (../images/). This produces the error.

change this part to:

define('VARTABLE1', '<table width="100%"  border="0" cellpadding="0" cellspacing="0" bgcolor="' . COLOR_TOP_EMAIL . '"   background="'. HTTP_SERVER . DIR_WS_CATALOG . 'images/' . BG_TOP_EMAIL . '" >

The same for other instances in the language files where the image directory (DIR_WS_IMAGES) is used:

just change:

DIR_WS_IMAGES

to:

'images/'

 

Hope this helps

Rainer


Edited by raiwa, 25 July 2014 - 06:25.


#1303   Spiceupyour

Spiceupyour
  • Members
  • 33 posts
  • Real Name:Sam B
  • Gender:Male
  • Location:Toronto

Posted 25 July 2014 - 10:37

testing


Edited by Spiceupyour, 25 July 2014 - 10:44.


#1304   Spiceupyour

Spiceupyour
  • Members
  • 33 posts
  • Real Name:Sam B
  • Gender:Male
  • Location:Toronto

Posted 25 July 2014 - 14:09

Dear rainer,

Thanks solved a part of my problem, now the store logo shows up but the item purchased picture and background still does the same thing

 

I have tried to replace the image directory in 3 places, did not work so with only one change in the second line [ define('VARLOGO',] i got the logo working

 

I think I have to move a copy stylesheetmail.css to the mobile directory ?

 

this is the error for the product purchased image 

h**P://www.mysite.com/test/catalog/mobile/h**P://www.mysite.com/test/catalog/images/4105_wt.jpg

 

original code

// Prepare Variables
define('VARSTYLE', '<link rel="stylesheet" type="text/css" href="'. HTTP_SERVER . DIR_WS_CATALOG . ' stylesheetmail.css">');   //Define CSS Stylesheet to use
define('VARLOGO', ' <a href="' . HTTP_SERVER . DIR_WS_CATALOG . '"><IMG src="'. HTTP_SERVER . DIR_WS_CATALOG . 'images/' . STORE_LOGO .'" border=0></a> '); //Define Logo location.  DO NOT CHANGE
define('VARTABLE1', '<table width="100%"  border="0" cellpadding="0" cellspacing="0" bgcolor="' . COLOR_TOP_EMAIL . '"   background="'. HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_IMAGES . BG_TOP_EMAIL . '" > ' ) ; //Header Table 
define('VARTABLE2', '<table width="100%" border="0" cellpadding="3" cellspacing="3" bgcolor="' . COLOR_TABLE . '"   background="'. HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_IMAGES . BG_TABLE . '">');   //Body table formatting
 
 
any advice will be appreciated
Thanks
Sam 


#1305   Spiceupyour

Spiceupyour
  • Members
  • 33 posts
  • Real Name:Sam B
  • Gender:Male
  • Location:Toronto

Posted 26 July 2014 - 13:36

Solved !!

 

Dear Rainer,

 

I had to do what you suggested

just change:

DIR_WS_IMAGES

to:

'images/'

 

Plus had to make changes to the config file

 

replace:

//defined('MOBILE_SESSION') ? define('DIR_WS_IMAGES', HTTP_SERVER . DIR_WS_HTTP_CATALOG . 'images/') : define('DIR_WS_IMAGES', 'images/'));
 
with:
defined('MOBILE_SESSION') ? define('DIR_WS_IMAGES', '../images/') : define('DIR_WS_IMAGES', 'images/');
 
works like a charm
 
Thanks
Sam

Edited by Spiceupyour, 26 July 2014 - 13:36.