Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


bumbarash

Recommended Posts

@@raiwa

 

addition of reviews in 5.4 requires change to Header Tags SEO

 

FIND

 

$str_replace_from = array('-mc-', '-mi-', '-mby-', '-mpr-', '-mp-', '-mm-', 'mobile_catalogue.php', 'mobile_about.php', 'mobile_', '?redirectCancelled=true', '&redirectCancelled=true');
$str_replace_to = array('-c-', '-i-', '-by-', '-pr-', '-p-', '-m-', 'index.php', 'index.php');

 

REPLACE WITH

 

$str_replace_from = array('-mc-', '-mi-', '-mby-', '-mpr-', '-mpri-', '-mp-', '-mm-', 'mobile_catalogue.php', 'mobile_about.php', 'mobile_', '?redirectCancelled=true', '&redirectCancelled=true');
$str_replace_to = array('-c-', '-i-', '-by-', '-pr-', '-pri-', '-p-', '-m-', 'index.php', 'index.php');

-Dave

Link to comment
Share on other sites

@@raiwa

 

In the upgrade instructions for 5.4 rev1

 

For #1, does this apply to the SEO 2.2d version? if so, I didn't see any similar change in the support package file

 

Also your instructions say

 

***FIND:
			 if (strpos($_SERVER['REQUEST_URI'], 'cPath=') == FALSE) {
				 $mobile_site = 'mobile_index.php';

***REPLACE WITH:
if (strpos($_SERVER['REQUEST_URI'], 'manufacturers_id=') == TRUE) {
							 $mobile_site = str_replace('index.php', 'mobile_catalogue.php', ($_SERVER['REQUEST_URI']));						
			 } else if ( (strpos($_SERVER['REQUEST_URI'], 'cPath=') == FALSE)) {

 

Shouldn't it be:

 

***FIND:
			 if (strpos($_SERVER['REQUEST_URI'], 'cPath=') == FALSE) {

***REPLACE WITH:
					 if (strpos($_SERVER['REQUEST_URI'], 'manufacturers_id=') == TRUE) {
							 $mobile_site = str_replace('index.php', 'mobile_catalogue.php', ($_SERVER['REQUEST_URI']));						
			 } else if ( (strpos($_SERVER['REQUEST_URI'], 'cPath=') == FALSE)) {

 

For #2 and #3

Again, is there a SEO URL version of these lines?

Your instructions say:

***FIND:

if (!isset($lng) || (isset($lng) && !is_object($lng))) {

 ***REPLACE WITH:

if (!tep_session_is_registered('language') || isset($HTTP_GET_VARS['language'])) {

 

The code I have currently is:

 

if ((SEO_ENABLED != 'true') and ((!isset($lng) || (isset($lng) && !is_object($lng))))) { // for seo urls 2.2d

 

Thanks!

 

The first part I'll check tomorrow, it seems to be a mistake.

For 2+3, yes it is not necessary any change for SEO URL, the standard code of iOSC5.4rev1 (should) work.

Sorry no update instr. added yet, will do this in the next update.

For the next post: You are right, Header tags has not been updated yet.

I'll do this the next days.

Link to comment
Share on other sites

installed 5.4rev1, seems to be working but how do I remove the parse time that keeps showing right below the header and make the index page go to products by default instead of sign in? PS great MOD just wish the colors weren't so ugly. Almost forgot changed the header image in header.php but that does not seem to work either.

 

Hello Matthew,

 

For the message can you please post the URL to your shop to see better what happens.

I'll check then what happens with your logo too.

 

For the colors: colors are a personal taste and in the install instr. I wrote "change the colors to fit your shops design" :rolleyes:

 

regards

Rainer

Edited by raiwa
Link to comment
Share on other sites

did some more digging for some reason my install of iosc 5.4 isn't showing any header images, even if I look in the source code from IE on the mobile page no reference to .png graphics or the main logo. I have seo 2.2d installed and haven't added the support yet but disable it with no avail.

Link to comment
Share on other sites

For the parse time message:

this is showing also on the desktop shop at the very end of the footer.

So this seems to be added by your server and if it doesn't show where you wants on the mobile side you should play with different </div> tags at the end of the mobile footer or disable this feature in your server settings.

If you added this code, it shows like this in the source code:

</div>
</div>
</body>
</html>
<span class="smallText">Parse Time: 0.050s</span>

then try to move the line:

<span class="smallText">Parse Time: 0.050s</span>

before the last </div> tag that the code shows like this:

</div>
<span class="smallText">Parse Time: 0.050s</span>
</div>
</body>
</html>

 

 

For the not showing images in mobile header:

I found that you are using an image cache/thumbnail contribution.

Try to change in mobile/includes/header.php line 57:

change:

tep_image(DIR_MOBILE_IMAGES. "home.png")

to:

tep_image(DIR_WS_HTTP_CATALOG . DIR_MOBILE_IMAGES. "home.png")

or this:

tep_image('/' . DIR_MOBILE_IMAGES. "home.png")

 

the same for the other images line 58-61

 

 

Please let me know if one of this changes works, it will be included in the troubleshooting section in the next update.

 

Kind regards

Rainer

Edited by raiwa
Link to comment
Share on other sites

Tried the image settings change but for some reason this one worked: tep_image(DIR_MOBILE_IMAGES. "home.png" . It was originally coded "tep_image(DIR_WS_HTTP_CATALOG . DIR_MOBILE_IMAGES. "home.png")"

Edited by mrossi
Link to comment
Share on other sites

The parse time thing is strange so if I turn off parse time in the osc admin under configuration, logging, Store Page Parse Time it goes away. I like seeing that on the pages to see how fast my server is running. It seems to be coming from the iosc mobile/includes/application_bottom.php file:

if (DISPLAY_PAGE_PARSE_TIME == 'true') {

I just changed it to false and all good!

Edited by mrossi
Link to comment
Share on other sites

Start by updating and upload your language files at /catalog/includes/languages/english.php... espanol.php.... etc

 

it is obviously missing

 

//BEGIN : IOSC Switch view labels
define('TEXT_SHOW_VIEW_1', '');
define('TEXT_SHOW_VIEW_2', ' View');
define('TEXT_CLASSIC_VIEW', 'CLASSIC');
define('TEXT_MOBILE_VIEW', '<b>MOBILE</b>');
//END : IOSC Switch view labels

 

and I can see right off there are more language defines missing - some buttons etc

Edited by Roaddoctor

-Dave

Link to comment
Share on other sites

The parse time thing is strange so if I turn off parse time in the osc admin under configuration, logging, Store Page Parse Time it goes away. I like seeing that on the pages to see how fast my server is running. It seems to be coming from the iosc mobile/includes/application_bottom.php file:

if (DISPLAY_PAGE_PARSE_TIME == 'true') {

I just changed it to false and all good!

 

@@mrossi

Checked this and there is one closing </div> tag to remove in the mobile footer.

 

Then it should look like this:

 

</table>
<?php
}
?>
</div>
</body>
</html>

 

I'll fix this in the next update

Edited by raiwa
Link to comment
Share on other sites

@@raiwa

 

I Just noticed that the also_purchased_products.php on the mobile side is displaying classic side links... see example here

 

Here is the current code. Any idea whats wrong?

 

<?php
if (isset($HTTP_GET_VARS['products_id'])) {
$orders_query = tep_db_query("select p.products_id, p.products_image from " . TABLE_ORDERS_PRODUCTS . " opa, " . TABLE_ORDERS_PRODUCTS . " opb, " . TABLE_ORDERS . " o, " . TABLE_PRODUCTS . " p where opa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and opa.orders_id = opb.orders_id and opb.products_id != '" . (int)$HTTP_GET_VARS['products_id'] . "' and opb.products_id = p.products_id and opb.orders_id = o.orders_id and p.products_status = '1' group by p.products_id order by o.date_purchased desc limit " . MAX_DISPLAY_ALSO_PURCHASED);
$num_products_ordered = tep_db_num_rows($orders_query);
if ($num_products_ordered >= MIN_DISPLAY_ALSO_PURCHASED) {
?>
<!-- also_purchased_products //-->
<div id="also_purchased">
<h1><?php echo TEXT_ALSO_PURCHASED_PRODUCTS; ?></h1>
<?php
 $col = 0;
 $info_box_contents = array();
 while ($orders = tep_db_fetch_array($orders_query)) {
 if($col > 2) break;

 $orders['products_name'] = tep_get_products_name($orders['products_id']);
 $col ++;
 $path = '<a href="' . tep_mobile_link(FILENAME_PRODUCT_INFO, 'products_id=' . $orders['products_id']) . '">';
 $img = tep_image(DIR_WS_IMAGES . $orders['products_image'], $orders['products_name'], MOBILE_IMAGE_WIDTH, MOBILE_IMAGE_HEIGHT);
?>
 <div id="prodCell_also">
 <div class="prodImg"><?php echo $path . $img . '</a>'; ?></div>
 <div class="prodName"><?php echo $path . $orders['products_name'] . '</a>'; ?></div>
 </div>
<?php	
 }
?>
</div>
<!-- also_purchased_products_eof //-->
<?php
}
}
?>

-Dave

Link to comment
Share on other sites

@@raiwa

 

I Just noticed that the also_purchased_products.php on the mobile side is displaying classic side links... see example here

 

Here is the current code. Any idea whats wrong?

 

<?php
if (isset($HTTP_GET_VARS['products_id'])) {
$orders_query = tep_db_query("select p.products_id, p.products_image from " . TABLE_ORDERS_PRODUCTS . " opa, " . TABLE_ORDERS_PRODUCTS . " opb, " . TABLE_ORDERS . " o, " . TABLE_PRODUCTS . " p where opa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and opa.orders_id = opb.orders_id and opb.products_id != '" . (int)$HTTP_GET_VARS['products_id'] . "' and opb.products_id = p.products_id and opb.orders_id = o.orders_id and p.products_status = '1' group by p.products_id order by o.date_purchased desc limit " . MAX_DISPLAY_ALSO_PURCHASED);
$num_products_ordered = tep_db_num_rows($orders_query);
if ($num_products_ordered >= MIN_DISPLAY_ALSO_PURCHASED) {
?>
<!-- also_purchased_products //-->
<div id="also_purchased">
<h1><?php echo TEXT_ALSO_PURCHASED_PRODUCTS; ?></h1>
<?php
 $col = 0;
 $info_box_contents = array();
 while ($orders = tep_db_fetch_array($orders_query)) {
 if($col > 2) break;

 $orders['products_name'] = tep_get_products_name($orders['products_id']);
 $col ++;
 $path = '<a href="' . tep_mobile_link(FILENAME_PRODUCT_INFO, 'products_id=' . $orders['products_id']) . '">';
 $img = tep_image(DIR_WS_IMAGES . $orders['products_image'], $orders['products_name'], MOBILE_IMAGE_WIDTH, MOBILE_IMAGE_HEIGHT);
?>
 <div id="prodCell_also">
 <div class="prodImg"><?php echo $path . $img . '</a>'; ?></div>
 <div class="prodName"><?php echo $path . $orders['products_name'] . '</a>'; ?></div>
 </div>
<?php	
 }
?>
</div>
<!-- also_purchased_products_eof //-->
<?php
}
}
?>

 

@@Roaddoctor

 

This is correct, the filename for mobile_product_info is defined like this in mobile/includes/configure.php:

define ('FILENAME_PRODUCT_INFO', 'mobile_product_info.php');

 

so beeing on the mobile page it will link correct to mobile_product_info.php

 

I know this is confusing, have already plans to fix this.

Edited by raiwa
Link to comment
Share on other sites

@@raiwa

Noticing, for example

 

from desktop, on an individual product review:

/...-pri-29.html?reviews_id=25

 

click to mobile side:

-mpri-29.html?reviews_id=25

 

click back to desktop:

-pri-29.html?reviews_id=25&redirectCancelled=true

 

So far all perfect.

 

now if I click some other link, such as the back button to go to the main review page, or even add to cart, etc

-pr-29.html?redirectCancelled=true

/shopping_cart.php?redirectCancelled=true

...

 

The ?redirectCancelled=true remains in the link for one more additional click, then it disappears. This happens in several areas of the store, and in some areas (like clicking on the Home page or a product page) it does not seem to happen. This probably isn't a big deal other than perhaps how cleanly the site gets indexed.

 

Dave

 

@@Roaddoctor

 

Hello Dave,

 

Just uploaded the new update iOSC5.4rev2 which resolves this.

redirect cancelled=true will not show any more in the urls.

Thanks for the push in this direction

 

The seo urls and header tags support update is on the way, please be patient.

 

regards

Rainer

Edited by raiwa
Link to comment
Share on other sites

@@raiwa

 

Nice update! much cleaner. Bug- I am noticing on some redirects a "?" is appearing at the end of url... seems to be intermittent and only on the pages that do not use seo url rewrite.

 

example: ...domain.com/mobile_specials.php?

-Dave

Link to comment
Share on other sites

@@Roaddoctor

 

This is correct, the filename for mobile_product_info is defined like this in mobile/includes/configure.php:

define ('FILENAME_PRODUCT_INFO', 'mobile_product_info.php');

 

so beeing on the mobile page it will link correct to mobile_product_info.php

 

I know this is confusing, have already plans to fix this.

 

Argh. I have something wrong then. Sometimes it has the correct -mp- link, and sometimes it has the -p- and redirects to desktop.

-Dave

Link to comment
Share on other sites

Argh. I have something wrong then. Sometimes it has the correct -mp- link, and sometimes it has the -p- and redirects to desktop.

 

@@Roaddoctor

 

Never noticed this in my shops.

To resolve it the only way would be to change the filename definition in mobile/includes/configure.php:

 

to

define ('FILENAME_MOBILE_PRODUCT_INFO', 'mobile_product_info.php');

But this means to search all mobile pages and replace it there too.

 

Just thought about and this should'nt be related to the filename definition, but with the seo url support, not sure, I'll research on this.

Fot the ? in some urls: I'll check this.

Edited by raiwa
Link to comment
Share on other sites

@@Roaddoctor

 

Never noticed this in my shops.

To resolve it the only way would be to change the filename definition in mobile/includes/configure.php:

 

to

define ('FILENAME_MOBILE_PRODUCT_INFO', 'mobile_product_info.php');

But this means to search all mobile pages and replace it there too.

 

Just thought about and this should'nt be related to the filename definition, but with the seo url support, not sure, I'll research on this.

Fot the ? in some urls: I'll check this.

 

@@Roaddoctor

 

If you look at this part of seo_class.php:

		    $seo_pages = array(FILENAME_DEFAULT,
							   'product_info.php',
							   FILENAME_POPUP_IMAGE,
							   'product_reviews.php',
							   FILENAME_PRODUCT_REVIEWS_INFO);
							   if ( defined('FILENAME_ALLPRODS_SEO') ) $seo_pages[] = FILENAME_ALLPRODS_SEO;
							   if ( defined('FILENAME_MOBILE_ALLPRODS_SEO') ) $seo_pages[] = FILENAME_MOBILE_ALLPRODS_SEO;
							   if ( defined('FILENAME_ARTICLES') ) $seo_pages[] = FILENAME_ARTICLES;
							   if ( defined('FILENAME_ARTICLE_INFO') ) $seo_pages[] = FILENAME_ARTICLE_INFO;
							   if ( defined('FILENAME_INFORMATION') ) $seo_pages[] = FILENAME_INFORMATION;
							   if ( defined('FILENAME_POLLBOOTH') ) $seo_pages[] = FILENAME_POLLBOOTH;
							   if ( defined('FILENAME_FAQDESK_INFO') ) $seo_pages[] = FILENAME_FAQDESK_INFO;
							   if ( defined('FILENAME_FAQDESK_INDEX') ) $seo_pages[] = FILENAME_FAQDESK_INDEX;
							   if ( defined('FILENAME_FAQDESK_REVIEWS_INFO') ) $seo_pages[] = FILENAME_FAQDESK_REVIEWS_INFO;
							   if ( defined('FILENAME_FAQDESK_REVIEWS_ARTICLE') ) $seo_pages[] = FILENAME_FAQDESK_REVIEWS_ARTICLE;
							   if ( defined('FILENAME_LINKS') ) $seo_pages[] = FILENAME_LINKS;
							   if ( defined('FILENAME_NEWSDESK_INFO') ) $seo_pages[] = FILENAME_NEWSDESK_INFO;
							   if ( defined('FILENAME_NEWSDESK_INDEX') ) $seo_pages[] = FILENAME_NEWSDESK_INDEX;
							   if ( defined('FILENAME_NEWSDESK_REVIEWS_INFO') ) $seo_pages[] = FILENAME_NEWSDESK_REVIEWS_INFO;
							   if ( defined('FILENAME_NEWSDESK_REVIEWS_ARTICLE') ) $seo_pages[] = FILENAME_NEWSDESK_REVIEWS_ARTICLE;
							   if ( defined('FILENAME_PAGES') ) $seo_pages[] = FILENAME_PAGES;
							   if ( defined('FILENAME_CATALOG') ) $seo_pages[] = FILENAME_CATALOG;
							   $seo_pages[] = 'mobile_product_info.php';
							   $seo_pages[] = 'mobile_product_reviews.php';
							   if ( defined('FILENAME_MOBILE_PRODUCT_REVIEWS_WRITE') ) $seo_pages[] = FILENAME_MOBILE_PRODUCT_REVIEWS_WRITE;
							   if ( defined('FILENAME_MOBILE_POPUP_IMAGE') ) $seo_pages[] = FILENAME_MOBILE_POPUP_IMAGE;
							   if ( defined('FILENAME_MOBILE_INFORMATION') ) $seo_pages[] = FILENAME_MOBILE_INFORMATION;
							   if ( defined('FILENAME_MOBILE_PRODUCT_REVIEWS_INFO') ) $seo_pages[] = FILENAME_MOBILE_PRODUCT_REVIEWS_INFO;								  

 

I'm not sure if these lines are correct:

 

							   $seo_pages[] = 'mobile_product_info.php';
							   $seo_pages[] = 'mobile_product_reviews.php';

 

compare to:

		    $seo_pages = array(FILENAME_DEFAULT,
							   'product_info.php',
							   FILENAME_POPUP_IMAGE,
							   'product_reviews.php',
							   FILENAME_PRODUCT_REVIEWS_INFO);

maybe it should be:

 

		    $seo_pages = array(FILENAME_DEFAULT,
							   'product_info.php',
							   FILENAME_POPUP_IMAGE,
							   'product_reviews.php',
							   FILENAME_PRODUCT_REVIEWS_INFO),
							   'mobile_product_info.php',
							   'mobile_product_reviews.php';
...................
							   if ( defined('FILENAME_PAGES') ) $seo_pages[] = FILENAME_PAGES;
							   if ( defined('FILENAME_CATALOG') ) $seo_pages[] = FILENAME_CATALOG;
							   if ( defined('FILENAME_MOBILE_PRODUCT_REVIEWS_WRITE') ) $seo_pages[] = FILENAME_MOBILE_PRODUCT_REVIEWS_WRITE;
							   if ( defined('FILENAME_MOBILE_POPUP_IMAGE') ) $seo_pages[] = FILENAME_MOBILE_POPUP_IMAGE;

 

 

what do you think? could you try this?

 

regards

Rainer

Link to comment
Share on other sites

Hi.. Rainer

 

I notice that the mobile_password_reset only changes the password on the desktop. I tried using the old and the new andriod phone and the password change does not function properly. Don't know if I did something wrong.

 

Using my mobile phone

(Mobile site)

I sign-in to my account -> my account -> your password

But the password does not change.

 

Thank you!

 

 

mobile_password_reset.php

 

<?php

 

require_once('mobile/includes/application_top.php');

 

require(DIR_WS_LANGUAGES . $language . '/' . str_replace("mobile_", "", FILENAME_PASSWORD_RESET));

 

$error = false;

 

if ( !isset($HTTP_GET_VARS['account']) || !isset($HTTP_GET_VARS['key']) ) {

$error = true;

 

$messageStack->add_session('password_forgotten', TEXT_NO_RESET_LINK_FOUND);

}

 

if ($error == false) {

$email_address = tep_db_prepare_input($HTTP_GET_VARS['account']);

$password_key = tep_db_prepare_input($HTTP_GET_VARS['key']);

 

if ( (strlen($email_address) < ENTRY_EMAIL_ADDRESS_MIN_LENGTH) || (tep_validate_email($email_address) == false) ) {

$error = true;

 

$messageStack->add_session('password_forgotten', TEXT_NO_EMAIL_ADDRESS_FOUND);

} elseif (strlen($password_key) != 40) {

$error = true;

 

$messageStack->add_session('password_forgotten', TEXT_NO_RESET_LINK_FOUND);

} else {

$check_customer_query = tep_db_query("select c.customers_id, c.customers_email_address, ci.password_reset_key, ci.password_reset_date from " . TABLE_CUSTOMERS . " c, " . TABLE_CUSTOMERS_INFO . " ci where c.customers_email_address = '" . tep_db_input($email_address) . "' and c.customers_id = ci.customers_info_id");

if (tep_db_num_rows($check_customer_query)) {

$check_customer = tep_db_fetch_array($check_customer_query);

 

if ( empty($check_customer['password_reset_key']) || ($check_customer['password_reset_key'] != $password_key) || (strtotime($check_customer['password_reset_date'] . ' +1 day') <= time()) ) {

$error = true;

 

$messageStack->add_session('password_forgotten', TEXT_NO_RESET_LINK_FOUND);

}

} else {

$error = true;

 

$messageStack->add_session('password_forgotten', TEXT_NO_EMAIL_ADDRESS_FOUND);

}

}

}

 

if ($error == true) {

tep_redirect(tep_href_link(FILENAME_PASSWORD_FORGOTTEN));

}

 

if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'process') && isset($HTTP_POST_VARS['formid']) && ($HTTP_POST_VARS['formid'] == $sessiontoken)) {

$password_new = tep_db_prepare_input($HTTP_POST_VARS['password']);

$password_confirmation = tep_db_prepare_input($HTTP_POST_VARS['confirmation']);

 

if (strlen($password_new) < ENTRY_PASSWORD_MIN_LENGTH) {

$error = true;

 

$messageStack->add('password_reset', ENTRY_PASSWORD_NEW_ERROR);

} elseif ($password_new != $password_confirmation) {

$error = true;

 

$messageStack->add('password_reset', ENTRY_PASSWORD_NEW_ERROR_NOT_MATCHING);

}

 

if ($error == false) {

tep_db_query("update " . TABLE_CUSTOMERS . " set customers_password = '" . tep_encrypt_password($password_new) . "' where customers_id = '" . (int)$check_customer['customers_id'] . "'");

 

tep_db_query("update " . TABLE_CUSTOMERS_INFO . " set customers_info_date_account_last_modified = now(), password_reset_key = null, password_reset_date = null where customers_info_id = '" . (int)$check_customer['customers_id'] . "'");

 

$messageStack->add_session('login', SUCCESS_PASSWORD_RESET, 'success');

 

tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

}

}

 

$breadcrumb->add(NAVBAR_TITLE_1, tep_mobile_link(FILENAME_LOGIN, '', 'SSL'));

$breadcrumb->add(NAVBAR_TITLE_2);

require(DIR_MOBILE_INCLUDES . 'header.php');

require('includes/form_check.js.php');

$headerTitle->write();

?>

<!-- header_eof //-->

<div id="iphone_content">

<!-- body //-->

<?php echo tep_draw_form('password_reset', tep_mobile_link(FILENAME_MOBILE_PASSWORD_RESET, 'account=' . $email_address . '&key=' . $password_key . '&action=process', 'SSL'), 'post', 'onsubmit="return check_form(password_reset);"', true);

?>

<div id="messageStack">

<?php

if ($messageStack->size('password_reset') > 0) {

echo $messageStack->output('password_reset');

}

?>

 

<div class="contentContainer">

<div class="contentText">

<?php echo TEXT_MAIN; ?>

</div>

</div>

 

<?php

?>

</div>

<div id="returning_cust">

<?php echo TEXT_MAIN; ?>

<br /><br />

<label for="password" class="float"><?php echo ENTRY_PASSWORD; ?></label>

<?php echo tep_draw_password_field('password'); ?>

<br />

<label for="confirmation" class="float"><?php echo ENTRY_PASSWORD_CONFIRMATION; ?></label>

<?php echo tep_draw_password_field('confirmation'); ?>

<br />

<?php echo ''.tep_mobile_button(IMAGE_BUTTON_CONTINUE).''; ?>

</div>

</form>

<?php require(DIR_MOBILE_INCLUDES . 'footer.php');

?>

Link to comment
Share on other sites

Hi.. Rainer

 

I notice that the mobile_password_reset only changes the password on the desktop. I tried using the old and the new andriod phone and the password change does not function properly. Don't know if I did something wrong.

 

Using my mobile phone

(Mobile site)

I sign-in to my account -> my account -> your password

But the password does not change.

 

Thank you!

 

 

mobile_password_reset.php

 

<?php

 

require_once('mobile/includes/application_top.php');

 

require(DIR_WS_LANGUAGES . $language . '/' . str_replace("mobile_", "", FILENAME_PASSWORD_RESET));

 

$error = false;

 

if ( !isset($HTTP_GET_VARS['account']) || !isset($HTTP_GET_VARS['key']) ) {

$error = true;

 

$messageStack->add_session('password_forgotten', TEXT_NO_RESET_LINK_FOUND);

}

 

if ($error == false) {

$email_address = tep_db_prepare_input($HTTP_GET_VARS['account']);

$password_key = tep_db_prepare_input($HTTP_GET_VARS['key']);

 

if ( (strlen($email_address) < ENTRY_EMAIL_ADDRESS_MIN_LENGTH) || (tep_validate_email($email_address) == false) ) {

$error = true;

 

$messageStack->add_session('password_forgotten', TEXT_NO_EMAIL_ADDRESS_FOUND);

} elseif (strlen($password_key) != 40) {

$error = true;

 

$messageStack->add_session('password_forgotten', TEXT_NO_RESET_LINK_FOUND);

} else {

$check_customer_query = tep_db_query("select c.customers_id, c.customers_email_address, ci.password_reset_key, ci.password_reset_date from " . TABLE_CUSTOMERS . " c, " . TABLE_CUSTOMERS_INFO . " ci where c.customers_email_address = '" . tep_db_input($email_address) . "' and c.customers_id = ci.customers_info_id");

if (tep_db_num_rows($check_customer_query)) {

$check_customer = tep_db_fetch_array($check_customer_query);

 

if ( empty($check_customer['password_reset_key']) || ($check_customer['password_reset_key'] != $password_key) || (strtotime($check_customer['password_reset_date'] . ' +1 day') <= time()) ) {

$error = true;

 

$messageStack->add_session('password_forgotten', TEXT_NO_RESET_LINK_FOUND);

}

} else {

$error = true;

 

$messageStack->add_session('password_forgotten', TEXT_NO_EMAIL_ADDRESS_FOUND);

}

}

}

 

if ($error == true) {

tep_redirect(tep_href_link(FILENAME_PASSWORD_FORGOTTEN));

}

 

if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'process') && isset($HTTP_POST_VARS['formid']) && ($HTTP_POST_VARS['formid'] == $sessiontoken)) {

$password_new = tep_db_prepare_input($HTTP_POST_VARS['password']);

$password_confirmation = tep_db_prepare_input($HTTP_POST_VARS['confirmation']);

 

if (strlen($password_new) < ENTRY_PASSWORD_MIN_LENGTH) {

$error = true;

 

$messageStack->add('password_reset', ENTRY_PASSWORD_NEW_ERROR);

} elseif ($password_new != $password_confirmation) {

$error = true;

 

$messageStack->add('password_reset', ENTRY_PASSWORD_NEW_ERROR_NOT_MATCHING);

}

 

if ($error == false) {

tep_db_query("update " . TABLE_CUSTOMERS . " set customers_password = '" . tep_encrypt_password($password_new) . "' where customers_id = '" . (int)$check_customer['customers_id'] . "'");

 

tep_db_query("update " . TABLE_CUSTOMERS_INFO . " set customers_info_date_account_last_modified = now(), password_reset_key = null, password_reset_date = null where customers_info_id = '" . (int)$check_customer['customers_id'] . "'");

 

$messageStack->add_session('login', SUCCESS_PASSWORD_RESET, 'success');

 

tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

}

}

 

$breadcrumb->add(NAVBAR_TITLE_1, tep_mobile_link(FILENAME_LOGIN, '', 'SSL'));

$breadcrumb->add(NAVBAR_TITLE_2);

require(DIR_MOBILE_INCLUDES . 'header.php');

require('includes/form_check.js.php');

$headerTitle->write();

?>

<!-- header_eof //-->

<div id="iphone_content">

<!-- body //-->

<?php echo tep_draw_form('password_reset', tep_mobile_link(FILENAME_MOBILE_PASSWORD_RESET, 'account=' . $email_address . '&key=' . $password_key . '&action=process', 'SSL'), 'post', 'onsubmit="return check_form(password_reset);"', true);

?>

<div id="messageStack">

<?php

if ($messageStack->size('password_reset') > 0) {

echo $messageStack->output('password_reset');

}

?>

 

<div class="contentContainer">

<div class="contentText">

<?php echo TEXT_MAIN; ?>

</div>

</div>

 

<?php

?>

</div>

<div id="returning_cust">

<?php echo TEXT_MAIN; ?>

<br /><br />

<label for="password" class="float"><?php echo ENTRY_PASSWORD; ?></label>

<?php echo tep_draw_password_field('password'); ?>

<br />

<label for="confirmation" class="float"><?php echo ENTRY_PASSWORD_CONFIRMATION; ?></label>

<?php echo tep_draw_password_field('confirmation'); ?>

<br />

<?php echo ''.tep_mobile_button(IMAGE_BUTTON_CONTINUE).''; ?>

</div>

</form>

<?php require(DIR_MOBILE_INCLUDES . 'footer.php');

?>

 

Hello ,@@Lucky4444

 

can you please post your shops url to see what happens

 

Kind regards

Rainer

Link to comment
Share on other sites

@@raiwa

 

Made the change - there is no obvious effect that I could notice.

 

@@Roaddoctor

 

Is there any rule to observe when this happens?

Could I see this in your shop?

Link to comment
Share on other sites

@@raiwa

 

Just a FYI. I finally realized what was preventing header tags seo from working properly on some of my pages... With the 5.4rev1 update, I forgot to make changes to /admin/includes/functions/header_tags.php for the new files

 

If present, find and remove or comment out any of these lines:

 

$excludeFilesList[] = 'mobile_product_reviews_info.php';
$excludeFilesList[] = 'product_reviews_info.php';


I also removed these lines (optional)

$excludeFilesList[] = 'create_account.php';
$excludeFilesList[] = 'login.php';
$excludeFilesList[] = 'mobile_create_account.php';
$excludeFilesList[] = 'mobile_login.php';

-Dave

Link to comment
Share on other sites

@@Roaddoctor

 

Is there any rule to observe when this happens?

Could I see this in your shop?

 

pretty much what i'm noticing is once a redirect occurs - say product to mobile product - the links in the also purchased module are sometimes correct, and sometimes opposite.

Site is here

-Dave

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...