Showing posts with label API. Show all posts
Showing posts with label API. Show all posts

Monday, November 4, 2013

Published 1:18 AM by with 0 comment

google translator


Language is the human capacity for acquiring and using complex systems of communication, and a language is any specific example of such a system. The scientific study of language is called linguistics. Estimates of the number of languages in the world vary between 6,000 and 7,000. However, any precise estimate depends on a partly arbitrary distinction between languages and dialects. Natural languages are spoken or signed, but any language can be encoded into secondary media using auditory, visual, or tactile stimuli, for example, in graphic writing, braille, or whistling. This is because human language is modality-independent. When used as a general concept, "language" may refer to the cognitive ability to learn and use systems of complex communication, or to describe the set of rules that makes up these systems, or the set of utterances that can be produced from those rules. All languages rely on the process of semiosis to relate signs with particular meanings. Oral and sign languages contain a phonological system that governs how symbols are used to form sequences known as words or morphemes, and a syntactic system that governs how words and morphemes are combined to form phrases and utterances.
Read More
    email this       edit

Monday, May 20, 2013

Published 2:17 AM by with 0 comment

Unable to fetch all items of an order in Magento?

I used this in my module. it may help you.

Load Magneto Order and Product Collection

$resource_model = Mage::getResourceModel('sales/order_collection');
$product_model = Mage::getModel('catalog/product');

Loop through order collection

$records = 0;
    $productData = array();
    $orderProductArr = array();

    foreach($resource_model as $all_orders)
    { 
        if($all_orders['status']!="canceled" && $all_orders['status']!="fraud")
        {  
            $i = 0;
            $items = $all_orders->getAllVisibleItems();

            foreach($items as $item)
            {
                $_product = $product_model->load($item->getProductId()); // getting product details here to get description

                $taxClassId = $_product->getData("tax_class_id");
                $taxClass = $_product->getData("tax_class_name");

                $taxRate = $order['tax_amount'];

                $orderProductArr[$i]['web_id'] = $item->getProductId();
                $orderProductArr[$i]['quantity'] = $item->getQtyToInvoice();
                $orderProductArr[$i]['price'] = $item->getPrice();
                $orderProductArr[$i]['description'] = $_product->getDescription();
                $orderProductArr[$i]['currency'] = $order['order_currency_code'];
                $orderProductArr[$i]['tax_id'] = $taxClassId;
                $orderProductArr[$i]['tax_amt'] = $taxRate;
                $orderProductArr[$i]['total_amt'] = ($item->getPrice()*$item->getQtyToInvoice())+($taxRate);

                $productData[$i]['title'] = $item->getName();
                $productData[$i]['web_product_id'] = $item->getProductId();
                $productData[$i]['price'] = $item->getPrice();
                $productData[$i]['product_sku'] = $item->getSku();
                $productData[$i]['tax_class'] = $taxClassId;
                $productData[$i]['description'] = $_product->getDescription();

                $tax_arr[$i]['tax_id'] = $taxClassId;
                $tax_arr[$i]['tax_class'] = $taxClassId;
                $tax_arr[$i]['tax_amt'] = $taxRate;

                $i++;
                unset($items);
            }   
            $data[$records]['order_data']['product_details'] = $orderProductArr;
            $data[$records]['order_data']['order_product_details'] = $productData;
            $data[$records]['order_data']['tax_arr'] = $tax_arr;
            unset($orderProductArr);
            unset($productData);
            unset($tax_arr);
            $records++;
        }   
    }
Read More
    email this       edit