Archive for 2010

Magento Delete Products and Categories

Published by calhoun on December 23rd, 2010 - in Magento

Magento LogoThe database structure used in Magento can be very complex to new starts – hence why recently I outsourced a major database manipulation project.

Part of this project involves wiping the database of products and categories frequently. So I decided to put this post into place – not because its nesessary original discovered or particuarily interesting. I created it simply so I can easily come back to the information I need when I am cleaning the database on test runs I got bored having to google each time and as you’ll see this is not exactly easy to remember.

Delete Categories:


TRUNCATE TABLE `catalog_product_bundle_option`;
TRUNCATE TABLE `catalog_product_bundle_option_value`;
TRUNCATE TABLE `catalog_product_bundle_selection`;
TRUNCATE TABLE `catalog_product_entity_datetime`;
TRUNCATE TABLE `catalog_product_entity_decimal`;
TRUNCATE TABLE `catalog_product_entity_gallery`;
TRUNCATE TABLE `catalog_product_entity_int`;
TRUNCATE TABLE `catalog_product_entity_media_gallery`;
TRUNCATE TABLE `catalog_product_entity_media_gallery_value`;
TRUNCATE TABLE `catalog_product_entity_text`;
TRUNCATE TABLE `catalog_product_entity_tier_price`;
TRUNCATE TABLE `catalog_product_entity_varchar`;
TRUNCATE TABLE `catalog_product_link`;
TRUNCATE TABLE `catalog_product_link_attribute`;
TRUNCATE TABLE `catalog_product_link_attribute_decimal`;
TRUNCATE TABLE `catalog_product_link_attribute_int`;
TRUNCATE TABLE `catalog_product_link_attribute_varchar`;
TRUNCATE TABLE `catalog_product_link_type`;
TRUNCATE TABLE `catalog_product_option`;
TRUNCATE TABLE `catalog_product_option_price`;
TRUNCATE TABLE `catalog_product_option_title`;
TRUNCATE TABLE `catalog_product_option_type_price`;
TRUNCATE TABLE `catalog_product_option_type_title`;
TRUNCATE TABLE `catalog_product_option_type_value`;
TRUNCATE TABLE `catalog_product_super_attribute`;
TRUNCATE TABLE `catalog_product_super_attribute_label`;
TRUNCATE TABLE `catalog_product_super_attribute_pricing`;
TRUNCATE TABLE `catalog_product_super_link`;
TRUNCATE TABLE `catalog_product_enabled_index`;
TRUNCATE TABLE `catalog_product_website`;
TRUNCATE TABLE `catalog_product_entity`;

TRUNCATE TABLE `cataloginventory_stock`;
TRUNCATE TABLE `cataloginventory_stock_item`;
TRUNCATE TABLE `cataloginventory_stock_status`;

insert  into `catalog_product_link_type`(`link_type_id`,`code`) values (1,'relation'),(2,'bundle'),(3,'super'),(4,'up_sell'),(5,'cross_sell');
insert  into `catalog_product_link_attribute`(`product_link_attribute_id`,`link_type_id`,`product_link_attribute_code`,`data_type`) values (1,2,'qty','decimal'),(2,1,'position','int'),(3,4,'position','int'),(4,5,'position','int'),(6,1,'qty','decimal'),(7,3,'position','int'),(8,3,'qty','decimal');
insert  into `cataloginventory_stock`(`stock_id`,`stock_name`) values (1,'Default');
Delete Categories:

TRUNCATE TABLE `catalog_category_entity`;
TRUNCATE TABLE `catalog_category_entity_datetime`;
TRUNCATE TABLE `catalog_category_entity_decimal`;
TRUNCATE TABLE `catalog_category_entity_int`;
TRUNCATE TABLE `catalog_category_entity_text`;
TRUNCATE TABLE `catalog_category_entity_varchar`;
TRUNCATE TABLE `catalog_category_product`;
TRUNCATE TABLE `catalog_category_product_index`;

insert  into `catalog_category_entity`(`entity_id`,`entity_type_id`,`attribute_set_id`,`parent_id`,`created_at`,`updated_at`,`path`,`position`,`level`,`children_count`) values (1,3,0,0,'0000-00-00 00:00:00','2009-02-20 00:25:34','1',1,0,1),(2,3,3,0,'2009-02-20 00:25:34','2009-02-20 00:25:34','1/2',1,1,0);
insert  into `catalog_category_entity_int`(`value_id`,`entity_type_id`,`attribute_id`,`store_id`,`entity_id`,`value`) values (1,3,32,0,2,1),(2,3,32,1,2,1);
insert  into `catalog_category_entity_varchar`(`value_id`,`entity_type_id`,`attribute_id`,`store_id`,`entity_id`,`value`) values (1,3,31,0,1,'Root Catalog'),(2,3,33,0,1,'root-catalog'),(3,3,31,0,2,'Default Category'),(4,3,39,0,2,'PRODUCTS'),(5,3,33,0,2,'default-category');

Her Majesties Head Could Come Off…

Published by calhoun on December 19th, 2010 - in News, Politics

Royal Mail 1st Class Stamp … the stamps of the postal service.

You might not think that this is an important element of the post system but the main postal operator, the Royal Mail is a Royal service which is why Her Majesties head is on postal stamps. In the event that plans to privatize the Royal Mail are pushed ahead with, then there is the chance that the new organization may wish to remove the Queens head from postage stamps.

Buckingham Palace has been in negotiations with ministers to ensure that the head should remain stuck on the stamp should the privatization go ahead. To think that with a multi billion pound deficit and international wars on multiple fronts that the Queen thinks her head being on a stamp is an important issue to take up ministers time with. I for one support removing the queens head even if privatisation doesn’t go ahead.

The legislation set forth for privatisation requires that any organizations which wish to use the monarch’s head must get royal approval first. But the business secretary indicates there is no perogative in the legislation that mandatorily requires them to even use the image of the monarch at all.

References
Telegraph

Iceland agrees to repay the UK for bank collapse

Published by calhoun on December 10th, 2010 - in News, Politics

Credit CrunchGordon Brown once said: “We are facing a global financial crisis which is probably the first truly global financial crisis of the modern world”. A statement which went on to prove to be accurate with the worldwide financial system collapsing around us it is no surprise that commercial entities were forced to close their doors to the public.

One of the biggest losers in this financial game of high risk investment where the risk outweighed the gain was the Icelandic banks. How many of us would expect to invest in a risky venture and be guaranteed our money back at the end of it? This is essentially what has been stalling negotiations over the last two years.

The collapse of the bank left many accounts out of pocket and the government issued a loan to the Icelandic government to ensure they could pay up for the closure of the banks.

Britain faced its share of troubles in this but companies that closed down as a result of the crisis and our vastly state owned banks dont even pay us dividends for the huge profits they are now paying. Nor do they seem interested in paying back money given to them in investment form by the government. Why should our banks be different from the Icelandic ones?

In a refferendum, Iceland voted 93% against an interest rate of 5% on the loan to Britain branding it an excessive interest rate which it quite rightly is excessive. The government should bear the responsibility of the loss and write off all interest on the loan – call it a we’re saving the world act.

References
Telegraph
Telegraph

United States should take responsibility for Wikileaks

Published by calhoun on December 8th, 2010 - in News, Politics

Dilbert Data SecurityIf Wikileaks has been acting like a terrorist organization it is most likely because the United States is trying to push the blame for the leak on Wikileaks. That is not however entirely accurate, we are referring of course to predominately United States Military and Diplomatic reports.

They key word there: United States.

United States Military Personnel and Diplomatic Staff have generated the reports, passed it on to their superiors, or their superiors secretaries whom in turn handed it in to their superiors most likely. So for every document that’s at least 3 people have seen it, although i would be surprised if it was just 3 there’s probably a whole bunch of personnel have access to the information.

This is where the leak came form, not from Australia, Julian Assange is by no means responsible for causing the leak – at most he might be responsible for distribution of the information but how is that different from what Blogger have done in response to the documents, likewise the news channels and papers around the world have reiterated some of the information. Does that mean we all need to hand ourselves in?

The problem lies with the United States personnel whom likely have commited Treason by releasing these documents to unauthorized parties. There is where justice must be sought. More importantly, given the scale of the security breach it must really bring into question how much trust countries can place in the United States in its position of dominance.

The release of the cables are a strong indicator that the United States does not take national security that seriously and should not be trusted with any information of a sensitive nature. Until such a time as they start considering this a serious problem countries must view discussions with US Personnel as something that will inevitably fall into the hands of unauthorized persons.

Australian foreign minister Kevin Rudd dismissed US diplomatic comments regarding him that came out from wikileaks as irrelevant – which it entirely is – it does not effect his ability to do his job. He has judged however that the US should consider this problem and deal with the culprits of the crime instead of using Assange as a scapegoat.

References
Guardian

Julian Assange Arrested – Eyes shift to Watch Sweden

Published by calhoun on December 7th, 2010 - in News, Politics

Julian AssangeThe founder of Wikileaks, Julian Assange has officially been arrested in the United Kingdom under an European Arrest Warrant issued by the Swedish authorities over sexual crimes. Assange has of course denied the allegations. The real question is how will the case play out, being now a high profile defendant, people are going to watch carefully how Sweden plays this out.

The slightest suspicion that this case has really been brought around by the United States would seriously damage the Swedish Government’s international reputation.

According to Reuters he turned himself in – possibly on the advice of his legal team which would show confidence in their ability to secure a not guilty verdict in the allegations made against him. Now that he has formally been arrested he will be brought in front of magistrates to have an extradition hearing date set. It is a requirement that this occurs within 21 days of his arrest. The outcome of said hearing will determine weather or not he is extradited to Sweden for them to conduct their trial against him.

His Swedish Lawyer has stated he will fight the extradition so if he is ordered to be extradited at the hearing it is likely an appeal will be made in Britain to the court of appeal so it is likely to tie up the case in the justice system for months before getting anywhere. The Swedish lawyer has indicated he believes that foreign influence[which is of course widely believed to be the United States] have an unjustified influence over the Swedish government in this case. If this is the case there is a good chance that the judge here may rule that extradition might breach his Human Rights and consequently deny the extradition to Sweden on these grounds.

References
Reuters

Governor: You criticised our Prime Minister, that not accepted here.

Published by calhoun on December 1st, 2010 - in News, Politics

Govner of the Bank of EnglandHe holds the position of Governor of the Bank of England. Quite an impressive job title if I do say so myself. However he is facing calls for him to resign from said position for he expressed concerns about Prime Minister David Cameron and Chancellor George Osborne.

He really should have know better. This is Britain, we Do not critisize our political figures and we definately do not express concern over their abilities. Its not like we live in a democratic state which values freedom of expression anyway.

Wait a second, isnt that one of our more important values? Well, we are a part of the European Union, so surely Article 11 of the european convention should apply even to our citizens.

Political figures, and even the governor are in the limelight of the public interest critisism from fellow peers and more importantly by the people that put them in the job – the voters is not only expected is mandatory. Without opening debat about the actions of our representatives and having the freedom to express ourselves against their actions without fear of reprimand like they do in such states as the Peoples Republic of China or Iran how can we possibility life a life where progress is put above the political interest of one political figure.

He informed the US ambassador that he belived the now Prime Minister lacked the experience to run the country, well who does if they havent done it allready?

References
The Gaurdian
The Telegraph
Article 11 EU

Europe Launches Investigation into Google

Published by calhoun on November 30th, 2010 - in Internet, News, Technology

Google MonopolyThe European Anti-Trust regulator has launched an investigation into Google over complaints by two rivals that Google demoted their sites on the grounds of being a competitor. Not surprisingly Microsoft filed a complaint with the commission against Google as well. Since when did it become standard business practice to assume your competitor is acting without genuine practices. If that were the case the regulators would have more cases than they know what to do with.

Google smugly responded with: “There is always going to be room for improvement, so we will be working with the Commission to address any concerns”

The commission has severe powers-  they can fine 10% of what the companies global turn over was if they find Google guilty of anti competition. Of course, if they act anything like Microsoft, the appeals process will take decades before any fines are ever paid. The commission will also investigate if the company acted maliciously over partner advertising – I think they are referring to ad-words for website revenue generation here.

References
Yahoo

Prince Andrew laughs in life or death revelations

Published by calhoun on November 30th, 2010 - in Internet, News, Politics

Look at the Person Talking PosterBoth Washington and London have declared that the release of documents from wikileaks are a massive threat to national security and could cost lives. But how realistic is this? Only a fraction of the documents have been released so far but what I have looked at hasn’t been exactly matters of life and death. Or for that matter things we were not already aware of.

In on release, the Secretary of State hinted that the US should prepare for possible further actions against Iran – It has long been suspected that USA wants to attack Iran over its nuclear program. They even went so far as to consult people on the matter. Surely this cant be the life and death stuff Washington and London is fearful of being released to the general public?

Perhaps they are referring to diplomatic discussions with  the Saudi Crown Prince which indicated that it was of importance to the King that the situation in Iran be dealt with by any means necessary. That was certainly unexpected, the Saudi government never seemed to be publicly working in co-operation with the western world before.

London might be just trying to cover up some rather humiliating revelations about Prince Andrew instead. The prince has accused the UK as having the best geography teachers in the world and that the US never was any good at Geography. Well, it wasn’t long ago that we heard a study suggesting that a disturbingly high percentage of American school children could not point out America on a map of the world. So that really is not new stuff either. The prince referring  to law enforcement as idiots well that perhaps is a new revelation but again, this really isn’t a threat to National Security of Britain let alone the United States.

So a lot of the dangerous stuff seems to relate to Iran, so is London and washington afraid of the retaliation from Iran? Well, they can sleep safely now, because Iran has responded: “We don’t give any value to these documents” – President Ahmadinejad stated in a press conference where he outright blames the United States for the release of these documents. A sign that no one is really taking the documents seriously, people are enjoying reading the remarks made by people that were in positions of power and heard things that in retrospect should perhaps never have been said for political correctness reasons.

References
Daily Mail
TheMirror
AllVoices

Gagging order for UK News over wikileaks

Published by calhoun on November 29th, 2010 - in News, Politics

The guys over at Wikileaks have done it again. Thousands of documents have been released from Diplomatic communications. However, the News may not be able to adequately discuss the matter, you see, Defense Advisory Notice has been issued meaning that the mainstream press can provide no published information about documents released by Wikileaks.

It is quite sad however. The majority of people who will be looking at this site will be mostly innocent civilians of countries some of the information isn’t even of a classified nature. It mostly is about diplomatic messages from embassies.

Some of the comments made by various political figures however do not paint them in a flattering picture. The criticism made by the United States most likely comes down to the fact they don’t want the responsibility and the accountability that one should expect would come as a result of their job as a politician. In a day and age where surveillance is the done thing , is it really unexpected that foreign political powers are likely to come into possession of the documents released. Politicians need to learn to be respectful and courteous at all times for they can never really know when they are on the record.

Naturally in the USA, they want to list wikileaks as a terrorist organization beliveing that they meet the criterior I disagree at best, they represent a political neuasance. US Foreign policy has for too long been a problem for the civilized world. I hear they called our Prime Minister a soft weakling or words to that effect. Does that mean that the United States is an enemy of Britain? No, after all, we reffer to him equally nastily! Its just the done thing in politics.

References
FreePlanet

Ofgem investigates the power and gas companies

Published by calhoun on November 26th, 2010 - in News, Politics

Corporate Fat CatIt will likely come as welcome news to British Gas customers which has a draconian approach to customers. They tend to move magically the previous occupant’s bill over to your name and claim the lot. Which is why when I moved into my current property on day one I “used” £200 worth of Gas and Electricity. It is also likely why British Gas will be the brunt of the representations of being the Bad Guy here. Admittedly, other companies are bad but I am sure that British Gas is going to top the list. Its been nearly a year since we moved in and asked EDF Energy to take over for dual fuel. “Our” latest British Gas bill game in at £500

They all blame the wholesale cost of energy, which according to British gas accounts for 54% of the bill. Of course, the wholesale cost has increased by 25% and the consumer bill by on average 38% so where did the rest of that increase come from? Surely, the sending of bills hasn’t increased that drastically. Lets face it, stamps have remained much the same price for years. Minimum wage hasn’t increased that much either so we can assume these costs are negligible in terms of our consumer bill. So what can that possibly leave that accounts for that huge bill? Oh yeah, the Greedy CEOs of the Energy industry. They are just increasing their profit margin at our cost, again.

Which is why Ofgem the industrial regulator has opted that it is time to investigate the energy suppliers. They did a similar investigation in 2008 however, and pretty much ruled in the favour of the energy companies. Let us hope that this time round they actually hit the energy companies very hard. Huge fines and order them to reduce prices. And whilst they are at it, open up the industry for freely moving between providers. Which clearly is not the case here.

References
UKFundraising
ManagementToday

© Copyright (c) 2011 Whitebunnywabbit
Web design manchester Textmimedia
Digital Photography at Digitcal