Skip to content

Moving and copying Magento product reviews

When running an ecommerce business, you’ll often find yourself having to create a new product when an essentially identical product is released with an updated SKU, or when switching from a Grouped to Configurable product. But what happens to the reviews you have accumulated on the old product? They’ll get lost, unless you move the reviews from the old product to the new, or you duplicate them…

Magento provides no easy way of doing this within the Admin UI, and as per usual the review’s data is strewn across multiple tables. However it’s not too painful to brew some custom SQL to do the job…

Move all Magento Product reviews from one product to another product

SET @old_id = 1694;
SET @new_id = 1751;
UPDATE m4g3_review SET `entity_pk_value` = @new_id WHERE `entity_pk_value` = @old_id;
UPDATE m4g3_review_entity_summary SET `entity_pk_value` = @new_id WHERE `entity_pk_value` = @old_id;
UPDATE m4g3_rating_option_vote SET entity_pk_value = @new_id WHERE entity_pk_value = @old_id;
UPDATE m4g3_rating_option_vote_aggregated SET entity_pk_value = @new_id WHERE entity_pk_value = @old_id;

Copy all Magento Product reviews from one product to another product

SET @old_id = 1634;
SET @new_id = 1637;
INSERT INTO m4g3_review ( `created_at`, `entity_id`, `entity_pk_value`, `status_id` ) (
SELECT `created_at`, `entity_id`, @new_id AS `entity_pk_value`, `status_id` FROM `m4g3_review` WHERE `entity_pk_value` = @old_id

INSERT INTO m4g3_review_entity_summary ( `entity_pk_value`, `entity_type`, `reviews_count`, `rating_summary`, `store_id` ) (
SELECT @new_id AS `entity_pk_value`, `entity_type`, `reviews_count`, `rating_summary`, `store_id` FROM `m4g3_review_entity_summary` WHERE `entity_pk_value` = @old_id

INSERT INTO m4g3_rating_option_vote ( `option_id`, `remote_ip`, `remote_ip_long`, `customer_id`, `entity_pk_value`, `rating_id`, `review_id`, `percent`, `value` ) (
SELECT `option_id`, `remote_ip`, `remote_ip_long`, `customer_id`, @new_id AS `entity_pk_value`, `rating_id`, `review_id`, `percent`, `value` FROM `m4g3_rating_option_vote` WHERE `entity_pk_value` = @old_id

INSERT INTO m4g3_rating_option_vote_aggregated ( `rating_id`, `entity_pk_value`, `vote_count`, `vote_value_sum`, `percent`, `percent_approved`, `store_id` ) (
SELECT `rating_id`, @new_id AS `entity_pk_value`, `vote_count`, `vote_value_sum`, `percent`, `percent_approved`, `store_id` FROM `m4g3_rating_option_vote_aggregated` WHERE `entity_pk_value` = @old_id

Need some help managing your Magento ecommerce store? Give us a call on 01380 830224 and we’ll see what we can do to ease your pain… 

Posted in Magento, Web Development | Comments Off on Moving and copying Magento product reviews

Can a Hackintosh really replace an Apple Mac?

You’re probably aware that Apple computers are built using the same standard parts that are used to create Windows PCs. You might not be aware that a standard PC can run the macOS, a so called ‘Hackintosh‘. An increasingly popular option for video editors, musicians and the somewhat geeky is to create a custom macOS compatible computer, tailored exactly to their needs.

What are the pros and cons of a Hackintosh?

The main pros are cost and choice. You can often built a dirt cheap Hackintosh for significantly less than Apple’s cheapest option, or built a more powerful and expandable computer than Apple currently offers. With a Hackintosh, everything is modular, so you can easily upgrade the RAM, hard drive, video card and processor.

The main con is the time you will spend specifying the components, building the computer and getting a working and stable Mac OS installed. A Hackintosh will work best when you carefully select the parts you are going to use so that they mirror the parts Apple use. Out of the box pretty much everything will just work as expected with minimal effort. However there are still significant pain points getting Sleep, WiFi, Bluetooth, NVMe SSDs, Thunderbolt and video cards to work cleanly. I’ve lost track of the time spent trying to get Sleep working on my Hackintosh, to the extend I’ve basically stopped bothering and just shut it down at night.

Who should consider a Hackintosh?

If you’re a bit of a masochist, an experienced computer builder, a video or music professional it might be worth considering. When you factor in buying good quality components, your own time and the software niggles, the sums generally don’t add up for everyone else.  If you need a laptop I wouldn’t even dream of it.

But for a small (and growing) number of professional Mac users, the frustration with Apple’s increasingly locked down and sealed designs is sufficient for them to go down the Hackintosh route. Even the newly announced iMac Pro, whilst on paper a monstrously powerful machine, is a completely sealed unit!

I personally cannot bring myself to buy a computer that I cannot upgrade the RAM or the hard drive. My 2011 MacBook Pro is still going strong, but sadly might be the last Apple laptop I buy from new, simply because I can’t bring myself to spend that amount of money on what I considered to be deliberately hobbled machinery.

Could a Hackintosh replace my Apple Mac?

Short answer –  yes, without question. Longer answer – once you have your initial hardware built, configured and tested, there’s very little difference in day to day use between a Hackintosh and an Apple Mac. Fundamentally what makes a Mac a Mac is the software, not the hardware. However getting to that point where you have a stable, cleanly running machine, and keeping it there after software updates can be a challenge.

Why do Hackintoshes  exist?

Until such time as Apple reintroduce computers aimed at high end or experienced creative professionals, with upgradable RAM, hard drives and ideally video cards, the slow haemorrhaging of creative users over to Windows or Hackintoshes will continue. Computers, unlike phones, are not short lived and disposable assets. In my experience, most people replace a computer every 4-6 years. During that time they may need more RAM, larger and faster hard drives, or want a more powerful video card. Apple have explicitly denied owners any upgrading opportunities, thus massively reducing the useful lifespan of the Apple computers they buy, whilst simultaneously increasingly the asking price. It’s this “double whammy” that’s driving people towards non-Apple solutions, be it Windows or a Hackintosh.

Here’s hoping that the mythical 2018 modular Mac Pro starts the reversal of the ( sadly industry-wide ) trend towards sealed, disposable computing than Apple themselves started…

Posted in Apple | Tagged , , , | Comments Off on Can a Hackintosh really replace an Apple Mac?

iPod Classic data recovery

On a few occasions over the years I’ve been asked to recover data from one of the “Classic” iPods. With modern iPod Touch and iPhone this is typically a futile job if the customer hasn’t backed up via iTunes or iCloud. However the older iPods use mechanical hard drives and hence there’s a good chance of recovering data.

I’ve recovered data from iPods that have been accidentally erased, are physically damaged so they won’t turn on, or have damaged Dock connectors and don’t work when plugged into your computer.

The hardest part is often physically getting into the case. Suffice to say, there is often blood and swearing. It’s almost impossible to do it without slightly scratching or distorting the case, which is a shame. Once you’re in, the real fun begins. Which one of the 3 HD manufacturers does it have? Once you know that, it’s time to hunt around for a matching ZIF cable. Then you can finally start evaluating what data you might recovery.

After successfully recovering nearly 10,000 rare songs for a client with an iPod with damaged Dock Connector, I was reminded what a satisfying, but somewhat convoluted job it is.

Lost some critical data? In a bit of a panic? There are almost always ways of recovering data, especially when it’s storage on a mechanical drive. So pour a cup of tea, take a deep breath and give us a call on 01380 830224.

Posted in iPod | Comments Off on iPod Classic data recovery

Solid State Hard drive upgrade service

If you’re wondering what you can do to improve the performance of your Mac, there’s one thing above all others that will improve performance. Simply put, replace the internal mechanical hard drive (HD) with a Solid State Drive (SSD).

Even if you have buckets of free RAM available, a Mac without an SSD is being strangled. The speed with which it can read and write data to disk is the rate limiting step for almost everything you do. You could buy a tricked out 27″ iMac with bucket loads of RAM and a normal HD and find that for most real-world usage it’s slower than a creaky MacBook from 2008 that has a SSD. And the situation is worse if you’re trying to run OS X 10.10 or 10.11. I find Macs with normal HDs just agonisingly slow when running Yosemite or El Capitan.

If you’d like to rejuvenate your MacBook, MacBook Pro, Macmini, MacPro or iMac we provide a cost effective SSD upgrade service. We tell you what parts your need to buy, then once you have them we then fit and install it for you. With prices starting from £45 + cost of parts, it’s a damn sight cheaper than shelling out on a new Mac.

It’s particularly sensible if you have an 2010 or later MacBook Pro, Macmini or iMac, as typically those machines have just as fast processors as brand new Macs and have SATA-3 internal buses. Plus they have the added advantage that you can upgrade the RAM, unlike modern Macs.

In the last few weeks we’ve upgraded a number of 2010 and 2011 27″ iMacs to Samsung TB 850 EVO SSDs for customers in Bath, Bradford on Avon, Warminster and Market Lavington. The drives admittedly aren’t cheap, but the performance bump is astonishing.

Mac running so slowly its driving you nuts? Please don’t hesitate to call 01380 830224 and we’ll see if you have a machine that’s sensible to upgrade.

Posted in Troubleshooting | Tagged | Comments Off on Solid State Hard drive upgrade service

Magento security patch SUPEE-7405 and PHP5.3 compatibility

In late January Magento released a pretty monolithic security patch that covered a wide range of issues, but specifically addressed a number of severe XSS ( Cross Site Scripting ) errors. As is often the cause with patching Magento, there are a few things to look out for, but one absolute howler if your website is still running on PHP5.3.

If you find that when you go to the Orders grid and view an Order the page is incomplete, it’s likely you’re running on PHP5.3 and you need to make a little tweak.

Open /app/code/core/Mage/Adminhtml/Helper/Sales.php, search for $links = [] and replace that with $links = array();

Someone at Magento decided to use the PHP5.4+ only syntax for declaring an array, thereby breaking backwards compatibility, all so they could save typing a few additional characters. A poor decision on their part…

Need help with eCommerce? Based in Somerset or Wiltshire and have a Magento or WooCommerce store that you need help with? Please give Sweet-Apple a call on 01380 830224 for efficient and sensibly priced support.

Posted in Web Development, Wordpress | Comments Off on Magento security patch SUPEE-7405 and PHP5.3 compatibility