Practical Web Applications for Daily Living…
Posts tagged magento
Magento Upsell (we also recommend) not showing solved
Sep 3rd
After trying almost everything from checking the javascripts codes, php codes, to trial and error delete and pasting back xml elements in catalog.xml to what ever possible solution I can think of, showing a lost We also Recommend tab is just a click of a button, I never expect to reindex the whole database after your first installation and I didn’t receive any warning that I should re index my whole system. I lost 5 hours just to learn a mistake, if something weird is happening to your magento data, please try to re index the system first before you touch any codes…
Ecommerce System Installation Singapore
Sep 3rd
We have successfully installed 10 ecommerce shops within 4 months using magento ecommerce system, having different business requirements gives pain during the development, but now, we are very proud to say, we know magento ecommerce system enough that we can cater the enterprice level already. We are moving towards integrating magento to other business software models like CRM and more advanced ERP systems. byeee.!!!
Setting Up Contact Form within Static Block in Magento
Aug 31st
Just put this within your static block
<ul>
<li>
<div class="input-box">
<div><label for="name">Name <span class="required">*</span></label> <input id="name" class="required-entry input-text" title="Name" name="name" type="text" /></div>
<div class="input-box"><label for="email">Email <span class="required">*</span></label></div>
<div><input id="email" class="required-entry input-text validate-email" title="Email" name="email" type="text" /></div>
<div class="input-box"><label for="telephone">Telephone</label><br /> <input id="telephone" class="input-text" title="Telephone" name="telephone" type="text" /></div>
<div class="input-box"><label for="comment">Comment</label><br /> <textarea id="comment" class="input-text" style="height: 150px; width: 525px;" title="Comment" cols="50" rows="5" name="comment"></textarea></div>
</div>
</li>
</ul>
</fieldset>
<div class="button-set">
<p class="required">* Required</p>
<input id="hideit" style="display:none !important;" name="hideit" type="text" /> <button class="form-button"><span>Submit</span></button></div>
</form>
<script type="text/javascript">// <![CDATA[
var contactForm = new VarienForm(‘contactForm’, true);
// ]]></script>
And adding fields just put normal fields like how to do it in normal html forms,
then add the variables in the Email Template that you will be using
which can be found at system>email transaction>
next thing is to go to system>Generals>Contacts> setup where the email should be sent.
Configurable Product Magento, switch view more images solved
Aug 22nd
Once again, I’ve managed to solve one fuzzy client request and stayed the weekend to kick this functionality into action.
My confidence in building website functionalities in the web is bursting that there is no impossible for me already, it just depends in time and of course your budget
well…. as usual I am sharing some code snippet that could help some fellow developers out there.
This is to replace the contents within the .more-views class in media.phtml of the product details.
where numx is the color attribute of the configurable product. this numx also is what I named the class populated hidden within the product detail page.
And is being rendered by this code
$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 style="display:none;">
<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>
</div>
<div style="display:none;">
<div class=’<?php echo $child->getResource()->getAttribute(‘Color’)->getFrontend()->getValue($child); ?>‘>
<h2><?php echo $this->__(‘mouse over image to zoom’) ?></h2>
<ul>
<li>
<?php
$assoc_product = Mage::getModel(‘catalog/product’)->load($child->getId());
foreach($assoc_product->getMediaGalleryImages() as $assoc_product_img){ ?>
<a href="<?php echo $this->helper(‘catalog/image’)->init($assoc_product, ‘image’, $assoc_product_img->getFile()); ?>" title="<?php echo $assoc_product->getName();?>" onclick="$(’image’).src = this.href; $(’imagex’).src = this.href; return false;">
<img src="<?php echo $this->helper(‘catalog/image’)->init($assoc_product, ‘thumbnail’, $assoc_product_img->getFile())->resize(70, 70); ?>" alt="<?php echo $this->htmlEscape($assoc_product_img->getLabel()) ?>" title="<?php echo $this->htmlEscape($assoc_product_img->getLabel()) ?>"/>
</a>
</li>
<?php } ?>
</div>
</div>
<?php } ?>
Ofcourse only demi Gods can understand this without proper explaination. Just PM me if you need something like this.
As I have search the web, I can’t find any solution in magento with this functionality.
This whole project is way beyond the clients budget. Lucky Him
Displaying Product Images of Associated Products with Configurable Products in Magento
Aug 21st
$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
$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
Aug 21st
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->__(‘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_height’)); ?></td>
enjoy!!!
How do you use configurable products versus group products in magento?
Zend framework, magento, webpage drafts
Aug 20th
There is a high possibility that I can’t have my first fully functional mini cms zend application, I have to spend every precious time to finish a large queue of customized ecommerce websites and complex cms websites.
Going to take a bath in 3, 2, 1 ….
Code Igniter instead of Magento
Aug 18th
There are some situations where you need to take a cab instead of taking MRT. The other day, I decided to code an online transaction from scratch and it took me 20 hours to do the backend and frontend using code igniter instead of magento, If I use magento to implement it, the complexity in tweaking magento will add me more stress. Thank God to understanding of MVC pattern I rapidly develop the Application in no time at all compared to the complexity and stress magento is giving me everytime a client what some fancy functionality.
I’ve finally appreciated the value of Rapid Application Development tools like Code Igniter.
F and b website Singapore
Aug 17th
Last night seems to be a very long night. There was a client who come to us and she doesn’t know about web development and ecommerce especially for foods and beverages type of online transaction, I was not familiar with this part of online transaction before so I just showed here a solution what here client wants, turns out the solution I proposed to her which is magento is quite limited or I still have to dig again on the core magento codes to achieve want they want. So I decided to better code the entire transaction from scratch, thanks to my code igniter capabilities I’ve manage to put the backend side the whole night, actually I slept around 4, starting from 8pm – 4am in the morning. Tonight I will finish the backend to kick this project away from my face.
Thanks to code igniter people for the resources I’ve found online.
Taking a bath in 3,2,1…
Ecommerce designer Singapore
Aug 15th
I tried to search for ecommerce developer in singapore using google search engine, as expected this blog is in the first page results, but when I try to search for ecommerce designer Singapore, this blog is nowhere to be found in the first page.
People might think that I can only do development for them, well… I do both actually from concept design ,analysis of design for integration, existing ecommerce platform, template conversation of design draft in raw psd files , development and script installation to live deployment and payment gateway integration like google checkout and PayPal.
I am expecting this blog to be on the first page of google search engine result for the keyword ecommerce designer singapore.
