Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

set_snapshot ?


tangocharly

Recommended Posts

Hello everybody,

 

What does that line means ?

$navigation->set_snapshot();

 

in this lines ?

 

if (tep_session_is_registered('customer_id')) {

$navigation->set_snapshot();

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

}

Tangocharly

Link to comment
Share on other sites

yeah, it means that the current page the user is on, is stored temporarily (the "snapshot" is set), so they can perform some action and then return to that page.

 

The main use of it is new customers, a snapshot is set on the checkout_shipping page, and they are sent to create a new account. Then when they have created a new account, the snapshot is recalled, and they are directed back to checkout_shipping to finish checking out

Link to comment
Share on other sites

ok so if i want to redirect the registred user to the account page if they try to access to the login page by the adress bar i don't have to put this :

 

if (tep_session_is_registered('customer_id')) {

$navigation->set_snapshot();

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

}

 

but just this

 

if (tep_session_is_registered('customer_id')) {

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

}

 

Thnaks for your help i am rookie in php

Tangocharly

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...