ASP.NET Storefront for PHP People

Hi! This post will increase in size as the scale of horror increases, but for now, you’ve been landed with the runt of the projects – an ASP dot Net Storefront Website running on IIS on a windows server. Horrible!

Anyway, when not in the backend CMS part of things, you’ll have to edit files. What are they? I’m not entirely sure, but there are a few which I have figured out:

  • In the root folder there are appears to be categorynamehere.aspx (eg. watches.aspx). This is a landing page for a specific category
  • Header and Footer are in the Controls directory
  • Display Format Stuff and other bits of the header etc is in XMLPackages
  • In the backend, store admin > products > category, the displayformat xml package = entity.sortgridwithprices.xml
  • Also in the backend,  the actual product uses product.simpleproduct.xml.config
  • You can pick what categories each product comes under in the mappings tab.
  • Home Page template for some obscure reason is found in skins/Skin_2
  • Theres a cache flush link at the top right next to your logout link – use it!

Commands: In the xml.config files there are various output things such as {aspdnsf:GetUrl()}. I will document each as I figure them out

  • {aspdnsf:GetUrl()}  the url of the page, put this anywhere to output it
  • {$pName} the product name

Update: Today I’ve been asked to convert some products to ‘In store Only’! This basically means that you can’t order the product from the website, and instead need to call to book it. This is actually quite simple to achieve, all that is required is in Manage Products, you select the item,

*Is Call to Order: NoYes

Now when you visit the product page again, the add to cart button has been replaced!
Also, if we need to edit the actual topic page, to do this we go into Content > Manage Topics, select your topic, and use the wysiwyg editor!

Installing a ZendFramework App on IIS

Yes yes I know. Please. I’m just doing my job.

Anyway, hatred of MS and their less than satisfactory web based products aside, heres how to set up a Zend Framework App on IIS. I am assuming IIS is already up and running and that PHP is installed (only because thats where I started from)

Open IIS, in the computer click on Web Sites.
In the action menu click new website.
Put in a description, hit next.
Stick the servers IP in, port, and domain, hit next
Browse to sites home path hit next
Assign permissions (I had to browse to folder, right click and un-read-only my session, uploads, and logs folders), hit next, and finish.

Ok. Now IIS uses some thing thats similar to .htaccess, only it isn’t. Its called IIRF, and it needs setting up if it isn’t already. You can get it here: Download the Ionic’s ISAP Rewrite Filter (IIRF) here

Create Iirf.ini and shove this in it: (this took hours of farting around to get working :-s )

RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d

RewriteRule ^/(.*(\.js|\.swf)(\?.+))$ - [L,I]
RewriteRule ^/(.*(\.js|\.ico|\.gif|\.jpg|\.png|\.css|\.html|\.htm|\.swf|\.flv))$ /$1 [L,I]
RewriteRule ^/(.*)$ /index.php/$1 [L,I]

Put this in your Zend Apps public folder. Note that the commented out rule is for ignoring css js and image files etc in your public folder so as not to get rewritten. However it messes with your GET parameters when you have a filename in the query.(IF anyone knows how to write a rule that say continue to route it if those extensions come after a question mark then PLEASE let me know!)

Restart IIS, and that should be you!

NB. Neither delboy1978uk nor anyone else endorses the use of IIS for any serious web development.

NB. I have found normal clean urls work but ?query=param gets dont! i will update once i fix this!