0

I have a Magento EE 1.9 website running two different themes for the same store: one for desktop and the other for mobile. The theme is changed based on user-agent using the design exception string under System -> Design -> Theme.

All I want to do is to see which orders came from the desktop theme and which orders came from the mobile theme, so I can determine if an order came from the desktop site or the mobile site.

Is there a way to save the name of the theme as a custom attribute or flag when an order is placed?

WackGet
  • 2,667
  • 3
  • 36
  • 50

1 Answers1

0

If I were you I'd create a Magento extension with event observer inside, and would listen to event and there you can update your order attribute or generate your feed, so it's up to you

sales_order_place_after

Then it depends how you developed your mobile theme in order to find it's name:

This should return the name of the theme

Mage::getSingleton('core/design_package')->getTheme('frontend')

But according to this SO topic

if you use 'Matched Expression' for 'template' you should better try

Mage::getSingleton('core/design_package')->getTheme('template')
Community
  • 1
  • 1
Sergei Guk
  • 1,775
  • 1
  • 13
  • 12
  • Sorry, I should have said, I know how to get the name of the theme but I don't know where to save it. Can I just do something like `$order->setMyCustomAttributeHere("myValue");`? Or do I have to define `myCustomAttribute` somewhere before I do that? – WackGet Oct 29 '13 at 23:55
  • can be done as an attriute, why not? read this, hope it helps http://stackoverflow.com/questions/12936470/adding-a-new-attribute-to-order-in-magento – Sergei Guk Oct 30 '13 at 05:27