Custom Search

ASP.net Framework

Displaying Product Images of Associated Products with Configurable Products in Magento

<?php

        $assoc_product = Mage::getModel(‘catalog/product’)->load($child->getId());     
        echo $assoc_product->getName();
        foreach($assoc_product->getMediaGalleryImages() as $assoc_product_img){ ?>
       
        <div>
          <img src=’<?php echo $this->helper(‘catalog/image’)->init($assoc_product, ‘thumbnail’, $assoc_product_img->getFile())->resize(70, 70); ?>‘ />
        </div> 
       
        <?php } ?>

The complete snippet is here

<?php

$product = Mage::getModel(‘catalog/product’);
$parent = $product->load($_product->getId());
$children = Mage::getModel(‘catalog/product_type_configurable’)->getUsedProductCollection($parent);
$xxx = $parent->getResource()->getAttribute(‘Color’)->getFrontend()->getValue($parent);
foreach($children as $child){  
   $child = $product->load($child->getId()); ?>
 
                <div>
        <a href="<?php echo $this->helper(‘catalog/image’)->init($child, ‘image’); ?>" id="<?php echo "link".$child->getResource()->getAttribute(‘Color’)->getFrontend()->getValue($child); ?>">
          <img src="<?php echo $this->helper(‘catalog/image’)->init($child, ‘image’); ?>" id="<?php echo "img".$child->getResource()->getAttribute(‘Color’)->getFrontend()->getValue($child); ?>" />
        </a>
       
        <?php
        $assoc_product = Mage::getModel(‘catalog/product’)->load($child->getId());     
        echo $assoc_product->getName();
        foreach($assoc_product->getMediaGalleryImages() as $assoc_product_img){ ?>
       
        <div>
          <img src=’<?php echo $this->helper(‘catalog/image’)->init($assoc_product, ‘thumbnail’, $assoc_product_img->getFile())->resize(70, 70); ?>‘ />
        </div> 
       
        <?php } ?>
       

         
        </div>
       
       
       
<?php } ?>

Display more Attribute in Table Grid of Group Product Details in Magento

Go to frontend/base/default/template/catalog/product/view/type/grouped.html

Add this code to the head of the table

<th class="a-right"><?php echo $this->__(‘Width’) ?></th>
  <th class="a-right"><?php echo $this->__(‘Height’) ?></th>

insert this code in the table body:
where ’sign_width’ and ’sign_height’ are attribute names.

<td><?php echo $this->htmlEscape($_item->getData(’sign_width’)); ?></td>
<td><?php echo $this->htmlEscape($_item->getData(’sign_height’)); ?></td>

enjoy!!!

How do you use configurable products versus group products in magento?

Zend Framework First Impression

Got my 30 minutes dive into the zend framework, installed it in my server and got a little play with layouts (masterpages in asp.net), the Bootstrap (not sure with asp.net mvc what is the equivalent for this one), application.ini (asp.net mvc has this) and some structure overview. Zend framework still has the Movel-View-Controller pattern and like any mvc framework i’ve work with, this pattern is very easy to adopt once you have the mindset, is it a little bit weird it you’ve just dive in from a typical object oriented programming structure… anyway… have to go… raining again with a hungry stomach to feed.

Payroll system Singapore

We are currently arming for a payroll system which is going to be deployed in Linux servers,  my first choice is asp.net mvc but I am not sure if it is supported on the engine that can run asp.net apps to Linux (forgot the name of the engine). So the second choice is PHP, since it is the closest language I am fluent in using next to c#. But building payroll system from scratch is a total pain how much more if I code everything from zero. I have to pick a reliable framework for this. I have a little  experience in cakephp and code igniter but I think this frameworks are still babys frameworks, I need a framework that has proven record and is used in enterprise level of applications. Enter Zend framework,  used by varien to build there magento ecommerce platform, hmmmm…. so I made my choice, zend.

I downloaded the manual documentation and yep, it is in mvc pattern.  So this thing is pretty easier for me.

Now the business analysis part, I am not an accounting Guy, I need to research on how payrolls flow, I really don’t care about this stuffs before.

I will be posting here the codes and scenarios as I move along with this project. Stay tune.

Zend Framework side-by-side with Asp.net MVC Framework

I was wondering if I can have unit testing with the zend framework like those tools I use in Asp.net MVC,
I’ve just downloaded the zend framework and I need to have a hang on it before the coming of a big project that we are currently preparing , if ever I will be the one to have my hands on it.

I believe that zend studio can help a lot just like how Visual Studio helps C# developers with there projects, I’m so sleepy and so over stress… need to go back home after this conversation with my girlfriend… bow.

CRM using Php

One of our clients wants to have a simple CRM type of web application, then want to deploy it in their servers which are all Linux base, I am planning to use php, I would like to use asp.net because I am very comfortable coding with csharp but the server is apache and db is mysql, daymmm….

The Company is an educational institution, they have multiple branches across their country. The company wants to make their clients access to the information about each of thier branches be easy. That is the reason why they want to build this application.

Here are the web applications requirements.
1. The company has multiple branches and each branch has different schedules. Each branch should be able to upload a CSV file to the servers and update the database according to the changes they have made.
2. Customers should be able to filter the result by branch, by events, by level.
3. It should be integrated to thier current CMS base website.
4. Should be daymmm fast…

Sounds easy right????

so here is the approach.

1. create a model to parse .csv files extra the data and update the database
2. create a model to get data from the database
3. create a controller to filter the getData model’s outputs.

sounds easy right????

here are some of my suggestion, but I won’t suggest it anyway to them so that less work more pay… anyway…

1. they should convince the user to login, so that they will know who is using their web app.
2. once they knew the user, they should have existing knowledge about the user, they can get information from sources like facebook, twitter or other social network sites.
(Because of these data, they can be able to interact with the user well).

Technology I would like to use:
1. I would like to use Google’s oauth to authenticate users.
2. I would like to integrate it with App Engine APIs
3. I would like to make use of gmail’s contextual capabilities.
4. I would like to make use of HTML capabilities. (but not too sure, because HTML5 is not yet fully implemented to the currently popular browsers)
5. I would like to package an Android App, for this webapp, and users can be able to download this app, and It will be triggered everytime a new event is updated in their watchlist.
6. and many2x more….

Sounds easy right????

Problem in my side.
1. Loaded with other tiny projects (can be visualized as zergling projects).
2. pre-occupied by personal hobbys with is still also doing programming (BS!!).

C# or Java?

As SaaS is getting hotter today for Business Solutions, Web Developers are arming themselves, And Because I am a C# web developer I want to go to the windows azure platform, the problem is, it is more expensive compared to the app engine of Google which is also a problem for me because I am a noob to Java, although Java and C# has some similarities I am still comfortable with C# because of Visual Studio Support.

Well… any soldier has to make a stand. Google it is. Java here I come….

Hope early next year 2011 first quarter, I can be able to have a Google Qualified Developer badge. Well… lets see what happens next….

Coding in Asp.net MVC

Its been more than 6 months now, I haven’t touch anything about C# MVC, I’ve been following asp.net mvc for 5 months, and I had created some web apps in my local drive, I have digested the concept of model-view-controller and transitioning to Zend Framework which is one of my current weapons right now is fast. Right now I have an Idea of a web application system that can give solution to project workflows and I want to deploy it in the cloud. I’ve done some UI design already and we are using it right now, although not automated since I just to the thing first in MS exel, but I want to deploy this system to the cloud because I find out that we have generated a very effective project management system here for project collaboration, even better than basecamp.

Well…. I still have a lot of projects to finish, I am targeting to finish my android game before the year ends, And still I haven’t find any resource that can be my reference on how to optimize java codes to run super fast in the Android Platfrom. The codes that I am using is super basic, and it cannot handle my game requirements, especially for animations.

I am very hungry already… have to go back home ASAP…. !!!!

Adobe Flash Player and Android

If Android Devices support Flash Player and Android Air is going to run on Android, then… there is no need for me to study Java codes to create games and applications. Or is it?

What are the advantages of building your application using java compared to using action script 3?

mmmm….

Iphone 4 is advocating HTML5, while Android is trying hard to save Flash Player,

This business is getting too complicated to create decisions already.

HTML5 surely is the future for Rich Internet Applications Experience in the browser,
Converting AS3 codes to native Android Codes? Is it really opmitized to run well on the Android Devices?

mmmmm….

I don’t know how to decide on this, but… It is my decision to stop my flash career. :)

I am still waiting for something this year to begin my full attack on the android games and apps before my transition to Iphone next year, but still it depends upon the demand of the market.

HTML 5 will kill Flash and SilverLight.

I’ve just read an article about the coming of ie9 and it is going to embrace html5,
daymmm… Thank god i did’nt dive too much on flash and didn’t even taste how to code in silverlight… the coming of html 5 will eventually eat this two browser plugins for rich internet applications.

Nehhhh… too much information about this… I will still have to dive my self into this magento thing..
If I can create an asp.net mvc application that will replicate how magento works… It will be a lot of fun for me…