Jump to content

Orange closed email accounts


keat

Recommended Posts

I didn't see this coming, but then I don't have one of the affected email addresses, but last week Orange closed a whole host of free email addresses.

  • Orange.net
  • Orangehome.co.uk
  • Wanadoo.co.uk
  • Freeserve.co.uk
  • Fsbusiness.co.uk
  • Fslife.co.uk
  • Fsmail.net
  • Fsworld.co.uk
  • Fsnet.co.uk

Is there a mod available that would generate a popup if a customer logged in with one the affected email accounts.

Link to comment
Share on other sites

I did consider groups thinking that I could somehow segregate these customers, but I don't see any way to create a login message.

I guess this feature hasn't yet been thought of .

 

mmmmmm, i can see a request post coming.

Link to comment
Share on other sites

This looks like it worked:

This did NOT work, but I think it would if the expression was correct.

content.account.php

<h2>{$LANG.account.your_account}</h2>
{if $pricing_group.product_id = '1' }
<h3>Please change your login email address and password</h3>
{/if}

where customer is added to Group with id=1 (I found the correct id number from phpMyAdmin.

Link to comment
Share on other sites

I'm struggling a little.

I added all the affected email addresses to a group, but then realised that I ought to really test it, so I added myself as well.

Now when I log in, I see the warning message, but after taking myself out of the group, I still see the message.

I tried a number of things, cleared the cache, cleared my browser cache, but still I see the message.

Not until I restored the original file, did the message subsbide, so at the moment, it looks as if the file edit is displaying the message to every login.

 

 

are you sure              '$pricing_group.product_id ='              is the correct string to use ??

 

should it not be $customer_membership.group_id

 

 

 

ah, I tried that, and the same thing happens.

Edited by keat
Link to comment
Share on other sites

52 minutes ago, keat said:

are you sure              '$pricing_group.product_id ='              is the correct string to use ??

No - it's not. I've tried several different strings, but couldn't figure out what would work.

Bsmither does something like add {debug} to the bottom of the file he needs to see what is available. You get a popup. Keep the popup, but delete the {debug} from the file.

I tried looking at the popup, but I just don't understand it all well enough to be able to spot what is needed.

Link to comment
Share on other sites

1 hour ago, Dirty Butter said:

It sure looks like this should have worked, but it doesn't.

{if $customer_membership.group_id = '1'}

If that is the correct variable (I haven't checked), the reason it isn't working is because you are using an assignment operator instead of a comparison operator. In other words, you are telling the code to set the group_id to equal 1, rather than checking if it is equal to 1.

One example of correct syntax is:

{if $customer_membership.group_id == '1'}

Note the double equals sign (==) - this is the non-strict comparison operator which will evaluate to true whether group_id is the integer 1 or the string '1'.

Link to comment
Share on other sites

Hoping that this was the answer, i made the edit, but I can't get the message to display.

 

<div>
  <h2>{$LANG.account.your_account}</h2>
  {if $customer_membership.group_id == '2'}
<h1>Your email address is no longer valid, Please update your details.</h1>
{/if}
  <div id="myaccount">    
    <ul>
      <li><a href="{$STORE_URL}/index.php?_a=profile" title="{$LANG.account.your_details}">{$LANG.account.your_details}</a></li>
      <li><a href="{$STORE_URL}/index.php?_a=addressbook" title="{$LANG.account.your_addressbook}">{$LANG.account.your_addressbook}</a></li>
      <li><a href="{$STORE_URL}/index.php?_a=vieworder" title="{$LANG.account.your_orders}">{$LANG.account.your_orders}</a></li>
      <li><a href="{$STORE_URL}/index.php?_a=downloads" title="{$LANG.account.your_downloads}">{$LANG.account.your_downloads}</a></li>
      <li><a href="{$STORE_URL}/index.php?_a=newsletter" title="{$LANG.account.your_subscription}">{$LANG.account.your_subscription}</a></li>
      {foreach from=$ACCOUNT_LIST_HOOKS item=list_item}
      <li><a href="{$list_item.href}" title="{$list_item.title}">{$list_item.title}</a></li>
      {/foreach}
    </ul>
  </div>
</div>

Link to comment
Share on other sites

I don't think that i'll ever understand PHP, it probably takes years of hard work and dedication.

I thought that i'd stumbled upon the issue, but sadly not.

 

Change   {if $customer_membership.group_id == '2'}

to   if {$customer_membership.group_id == '2'}

I'll keep digging though.

 

 

Does this need someing to compare the two database tables.

ie something along the lines ..

if   $customer_customer_id == $customer_membership.customer_id and $customer_membership.group_id ==2 then echo my string ??

Edited by keat
Link to comment
Share on other sites

Part of your problem may be that CubeCart doesn't by default share the customer group membership data with SMARTY, so the variable `$customer_membership` shouldn't even exist unless you have specifically set it yourself.

Another issue is that fetching customer memberships would give you an array, not a single value, so it will never be equal to 2.

This code will do what you need:

// You can create a snippet for `class.cubecart.display_homepage` or just add this code
// directly to `cubecart.class.php::displayHomePage()` around line 128:
$GLOBALS['smarty']->assign('CUSTOMER_GROUPS', $GLOBALS['user']->getMemberships());

// Then add the following to your `content.homepage.php` template, probably right before the {if $LATEST_PRODUCTS} line
{if isset($CUSTOMER_GROUPS)}
	{foreach from=$CUSTOMER_GROUPS item=group}
		{if $group.group_id == 2}
			<div class="small-12">
				<p>Your message here</p>
			</div>
			{break}
		{/if}
	{/foreach}
{/if}

 

Edited by bsandall
Link to comment
Share on other sites

We get customers who give us faulty email address quite frequently. I can see this being very useful, not just for these no longer valid free addresses.

Your code works perfectly @bsandall But a returning customer may not go to the homepage. Can it be made to show on the Account page, which is what they see when they login?

That was easy enough to move:

cubecart.class:

		// Custom Account Menu Items BSANDALL ADDED GROUPS TO SMARTY BELOW
		$account_list_hooks = array();
		foreach ($GLOBALS['hooks']->load('class.cubecart.account.list') as $hook) include $hook;
		$GLOBALS['smarty']->assign('ACCOUNT_LIST_HOOKS', $account_list_hooks);
$GLOBALS['smarty']->assign('CUSTOMER_GROUPS', $GLOBALS['user']->getMemberships());
		$content = $GLOBALS['smarty']->fetch('templates/content.account.php');
		$GLOBALS['smarty']->assign('SECTION_NAME', 'account');
		$GLOBALS['smarty']->assign('PAGE_CONTENT', $content);
	}

and content.account.php

<h2>{$LANG.account.your_account}</h2>
{if isset($CUSTOMER_GROUPS)}
	{foreach from=$CUSTOMER_GROUPS item=group}
		{if $group.group_id == 1}
			<div class="small-12">
				<h3>Your email address is no longer valid. Please edit your Profile.</h3>
			</div>
			{break}
		{/if}
	{/foreach}
{/if}

 

Link to comment
Share on other sites

23 minutes ago, Dirty Butter said:

We get customers who give us faulty email address quite frequently. I can see this being very useful, not just for these no longer valid free addresses.

Your code works perfectly @bsandall But a returning customer may not go to the homepage. Can it be made to show on the Account page, which is what they see when they login?

 

You could put it wherever you want, yes, provided you make sure to assign the customer group data to SMARTY before whatever page it is you want to display it on is loaded.

Link to comment
Share on other sites

OK - all that works, but we still have a problem. We manually added these email addresses to the Bad Email Group. Once the customer has changed their login email address they are STILL in that group. We need some way to automatically email us with their new email address, or we'll have to ask them to contact us. We now need some way to know to manually or automatically take them out of the group.

For now, I've worded it as

<h3>Your email address is not valid. Please edit your Profile. Then <a href="{$STORE_URL}/contact-us.htm">contact us</a> with your new email address, so we can finish upgrading our records.</h3>

 

Link to comment
Share on other sites

12 hours ago, Dirty Butter said:

OK - all that works, but we still have a problem. We manually added these email addresses to the Bad Email Group. Once the customer has changed their login email address they are STILL in that group. We need some way to automatically email us with their new email address, or we'll have to ask them to contact us. We now need some way to know to manually or automatically take them out of the group.

For now, I've worded it as


<h3>Your email address is not valid. Please edit your Profile. Then <a href="{$STORE_URL}/contact-us.htm">contact us</a> with your new email address, so we can finish upgrading our records.</h3>

 

I never thought of that.

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
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...