Recover Deleted Customer

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Hace 7 años
Apologize moderators if this is not in the right place, i cannot find where to place this topic.

Would someone know how i can link the sql software on my computer to the plesk server to run SQL queries?

I'm looking to recover a deleted customer by setting deleted status from 1 to 0, can i do that in a file?

I can't seem to find that file after browsing through the files on the server (file which stores cutomer information.)

Or what is the easiest way for me to recover a deleted customer?

PS. mainly because of the username and email address that is associated with that deleted customer cannot be registered again.

A guide for dummies would be preferred (or step by step).
Hace 7 años
猫天 wrote:
Would someone know how i can link the sql software on my computer to the plesk server to run SQL queries?

I don't use shared hosting so I'm not really familiar with Plesk but your host should be able to advise you how to connect or the Plesk documentation has some guides: https://docs.plesk.com/en-US/12.5/customer-guide/advanced-website-databases/creating-databases.65157/#o71841.
Hace 7 años
Thank you Pete, E-commerce website are just so hard for new beginners to get everything right.
Hace 7 años
Another alternative is to just install SQL Server Management Studio on your local machine.
You will define the same connection string as what you have in your App_Data/Settings.txt to connect to your database.

From there you can browse to the Customer table, right-click it and choose "Edit top 200 rows"...after it generates the list of the top 200 rows, you can right-click on the screen and choose "Pane" >> SQL
Then you will see the SQL statement that caused the top 200 results to appear...you just have to edit this SQL statement a bit:

SELECT        Id, CustomerGuid, Username, Email, Password, PasswordFormatId, PasswordSalt, AdminComment, IsTaxExempt, AffiliateId, Active, Deleted, IsSystemAccount, SystemName, LastIpAddress,
                         CreatedOnUtc, LastLoginDateUtc, LastActivityDateUtc, BillingAddress_Id, ShippingAddress_Id, VendorId, HasShoppingCartItems
FROM            Customer
WHERE (Id = 12345)

Then press the red "!" icon in the toolbar to execute your query.
It will now show you only the one customer record with that Id. Just change the "Deleted" column value from True to False.
Hace 7 años
Thank you MVP!
Hace 7 años
If there is an interface in your hosting control panel for executing SQL scripts against your database, the query would be:

update customer set deleted=False where id=12345

and if that has a problem, then do this:

update customer set deleted=0 where id=12345
Hace 7 años
Yes that would be much easier, but our hosting provider does not provide such.

They have emailed back just then guiding me how to connect from MSSMS to my database.

petemitch wrote:
Would someone know how i can link the sql software on my computer to the plesk server to run SQL queries?
I don't use shared hosting so I'm not really familiar with Plesk but your host should be able to advise you how to connect or the Plesk documentation has some guides: https://docs.plesk.com/en-US/12.5/customer-guide/advanced-website-databases/creating-databases.65157/#o71841.
Thanks Pete

I have executed the line: update customer set deleted=0 where email= , and was successful!

Thank you again!

By any chance do you know how to set the size when table is inserted into the rich text editor?

<table>
<tbody>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
</tbody>
</table>

These just extend the table to either end of the screen and leave a huge gap in between.


Also resizable iframe solutions on: http://jsfiddle.net/JBhp2/
How do i insert this into nopCommerce? The videos on my site look terrible from mobile.
Hace 7 años
No, I don't, but you can create a class and put on your table using the "View Source" button in the rich editor. Then just add the definitions for that class into your stylesheet.

like:
<table class="YourNewClassName">
<tbody>
<tr class="YourNewClassName">
<td></td>
<td></td>
</tr>
<tr class="YourNewClassName">
<td></td>
<td></td>
</tr>
</tbody>
</table>


...and in your stylesheet:

.YourNewClassName table {
    width: 90%;
    max-width: 95%;
    border: 1px solid #cacaca;
}
.YourNewClassName tr {
    background-color: #dadada;
}


etc...

Then, just remember to add the same class onto any table you create using the rich editor and it will be consistent looking throughout your site.
Hace 7 años
Oops...

The table code would just need the class on the table, not on the tr's:

<table class="YourNewClassName">
<tbody>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
</tbody>
</table>


For example, here's table code that sets colors and hover colors for the rows:

.YourNewClassName{
    width:95%;
    border-collapse:collapse;
  }
  .YourNewClassName td{
    padding:3px; border:#1E3240 1px solid;
  }
  /* Define the default color for all the table rows */
  .YourNewClassName tr{
    background: #fff;
  }
  /* Define the hover highlight color for the table row */
.YourNewClassName tr:hover {
     background-color: #dadada;
}
Hace 7 años
Essentially, all you have to do to get your iframe-embedded videos(Youtube or whatever) to be responsive is add the "max-width" property to the element, like:

<div class="video-container"><iframe src="//www.youtube.com/embed/e2tkIzHuqHc" width="420" height="315" frameborder="0" allowfullscreen="allowfullscreen"></iframe></div>


And in your stylesheet, add this (and tweak it however you need):

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    padding-top: 30px;
    height: 0;
    overflow: hidden;
}

.video-container iframe,
.video-container object,
.video-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
}
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.