Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 01-05-2010 05:50:10

kev
Member
Registered: 03-16-2009
Posts: 399

Database Restore not working

Hi,

I choose to restore a previous database backup and during the process (around 40%) I was logged out and got this message: "The page requested is not accessible using the credentials supplied. Please login to access the requested page."  I logged back in and tried again - same result!

I've ran the restore options a few more times and discovered that the above problem happens when restoring what looks like the 'core_sessions' table.

I was wondering if this anything to do with the initial store setup by Kryptronic? Something to do with access settings for my login details or something?  Would somebody please sort this out before my shop goes live because I need the backup restore to work in case the shop data gets corrupted and I need to use a database table backup to correct any data errors.

Offline

 

#2 01-05-2010 16:40:34

Tanushiheadbash
Member
From: Stirling, Scotland
Registered: 07-20-2009
Posts: 82

Re: Database Restore not working

How long is your restore taking- how big is your restore file- sounds to me like you are reaching your php/or mysql timeout l or filesize limit before its finsihed the restore.
It might be what you need to do is
1) break down your restore file into chaunks - say a few tables at a time- where are you running the restore from if using a database management tool like phpMy Admin or Navicat- the way i would do it they usually have a limit of about 2Meg for a sql file upload. So breaking the restore file into sub 2meg files would work usually.
2) The file you restore from is just a load of sql strings- if you open it and look so they can be cut and paste in one at a time if necessary- obviously this would take a wee while- but th epoint i am making is you can break it up
3) The sessions table I am pretty sure is not necessary to be restored- obviously the structure is but I think you can get away without the data as its only to attach user behaviour to the sessions and will be rebuilt as visitors return its not essential its kept. I am know authority on this but It would not worry me to leave this table empty I think you will find everything works fine you just won't have a histroy for a use ron a return visit like recently viewed items for example.

HTH
K

Last edited by Tanushiheadbash (01-05-2010 16:41:25)

Offline

 

#3 01-06-2010 07:26:04

kev
Member
Registered: 03-16-2009
Posts: 399

Re: Database Restore not working

There must have been something wrong with the restore contents because I deleted that instance and choose to restore a more recent set and it worked ok this time.

Thanks for taking the time to explain things.  I have loads of work to do and didn't have enough time to experiment with backup sets.

Don't suppose you know how get the VAT 'Actual Rate' to display 17.5% instead of 17.505% like CCP UK displays the Vat rate?

Offline

 

#4 01-06-2010 14:16:04

Tanushiheadbash
Member
From: Stirling, Scotland
Registered: 07-20-2009
Posts: 82

Re: Database Restore not working

My client has the same question- must look into this too!

Offline

 

#5 01-06-2010 14:23:16

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Database Restore not working

That could be done by editing the order summary includes under System | Displays | Display Includes.  In each you will see:

Code:

$rate = ($item['cartdata']['totalbasis']['taxcountry'] - $item['cartdata']['totalbasis']['taxcountryref']) / $item['ordertotal'];

$rate = round(100 * $rate,3);
if (preg_match('/\./',$rate)) {list($integer,$decimal) = split('\.',$rate,2);} else {$integer = $rate; $decimal = 0;}
while (strlen($decimal) < 3) {$decimal .= '0';}
$rate = $this->xhtml_encode($integer . '.' . $decimal . '%');

Change to:

Code:

$rate = ($item['cartdata']['totalbasis']['taxcountry'] - $item['cartdata']['totalbasis']['taxcountryref']) / $item['ordertotal'];

$rate = round(100 * $rate,2);
if (preg_match('/\./',$rate)) {list($integer,$decimal) = split('\.',$rate,2);} else {$integer = $rate; $decimal = 0;}
while (strlen($decimal) < 2) {$decimal .= '0';}
$rate = $this->xhtml_encode($integer . '.' . $decimal . '%');

Nick Hendler

Offline

 

#6 03-16-2010 00:06:02

mdgretail
Member
Registered: 03-13-2006
Posts: 20

Re: Database Restore not working

Hi I have another problem with this, if you charge VAT on the delivery and I have to, it then adds this to the vat toatal of the product and increases the VAT % sum.

Example

Item Subtotal Exc VAT     £25.49
Delivery Total     £5.95
European Union VAT Total     £5.50
Total     £36.94

Item     Quantity     Total                                       Exc VAT   VAT
Celtic motif wall clock 38cm     1     £25.49     £5.50     21.58%  This is just wrong it's using the vat from the postage against the product price

If I remove vat from the postage the rate goes back to 17.5%

How do I fix this please, very urgent as on a live site

Thanks

Offline

 

#7 03-16-2010 03:37:23

kev
Member
Registered: 03-16-2009
Posts: 399

Re: Database Restore not working

Hi,

I've been waiting for this Vat fix for around 2 months now.  Your about the 4 or 5 person on this forum to flag this functionality as a bug for UK Vat registered businesses.  Try adding more than one item to the basket and watch what happens to the Vat summary percentages.

There is some talk on here from Kryptronic about an update to EuropaCart that will address some functionality issues, but no mention of whether the Vat problem will be fixed.  This update was also supposed to be ready by the end of Feb.  I'm probably going to have to fix this myself and hope that my code changes don't have a negative impact on other parts of the app as my customers are asking for Vat summaries as we approach the accounting year end.

If this helps you at all:

With the UK version I normally just direct my customers to login to their accounts and choose view printable Invoice (or whatever its called when viewing orders).  This allows for the fact that you can change the code XHTML scripts for order displays at any time and that new code display will be available to both new and previous orders.  Or to put another way, edit your php code, set dispaly Vat Summary in the admin system and then when a previous customer asks to see a vat summary of their order this will be available via the choose view printable Invoice whcih opens a prinatble invoice/sales receipt in a browser window.

Offline

 

Board footer