<input type="text" id="productCost" name="per_product_cost" value="<?php if (!empty($project['per_product_cost'])) { echo $project['per_product_cost']; } ?> " style="width:185px"><a href="#" id="productSubmit" style="text-decoration: none;"><span class="submitButton"> Submit</span></a> </div> <div id="contdProduct" class="form-item" style="display: none; margin-top: 15px;"> <label></label> <div class="form-item"> <label></label> <span style="height: 200px; padding: 15px; border: 1px solid;"><a href="#" class="upload-product-image"> <?php $image = getProductImage($id); if (!empty($image)) { echo $image['file_name']; } else { ?> Click to upload final product picture <?php } ?> </a> <input type="file" id="upload_product_image" style="display: none;"> <input type="hidden" id="uploaded_product_image" name="uploaded_product_image" > </span> <span style="height: 200px; padding:15px; border: 1px solid;">Reward for Investment</span>
<?php if (!isset($logged)) { header('Location:login.html'); } if (!hasPermission($logged, 'access', 'product_form')) { header('Location:permission.html'); } if (isset($_GET['product_id'])) { $product_id = $_GET['product_id']; } if (isset($logged) && $_SERVER['REQUEST_METHOD'] != 'POST') { $data = array('product_id' => $product_id); $image_info = getProductImage($data); } if ($_SERVER['REQUEST_METHOD'] == 'POST') { $product_id = $_POST['product_id']; $image = $_POST['file_image']; if (empty($error)) { $edit_data = array('product_id' => $product_id, 'image' => $image); $edit_query = updateProductImage($edit_data); if ($edit_query) { $_SESSION['success'] = $lang['success_edit']; } else { $_SESSION['error_warning'] = $lang['error_query']; } header('Location:product.html'); } } ?>
<div class="name"> <?php echo $product['brand'] . " " . $product['model']; ?> </div> </div> <div id="description"> <table width="900" border="0"> <tr> <td width="412"> <div class="product_image"> <?php $data_image = array('product_id' => $product_id, 'start' => 0, 'limit' => 1); $images = getProductImage($data_image); if ($images) { foreach ($images as $image) { $images_show = "product/" . $product_id . "/" . $image['image']; } } else { $images_show = "no_image.jpg"; } ?> <input type="image" src="data/image/<?php echo $images_show; ?> " width="390" height="275" border="0" input name="link" type="submit" value="<?php echo $product['brand'] . " " . $product['model']; ?> " />
Mage::log($hasData); */ $str = ''; $productNum = 0; $ids = array(); foreach ($rows as $row) { $ids[] = $row->entity_id; } //Prepare custom attributes list. $customAttributes = json_decode(Mage::getModel('conversionpro/cache')->getCollection()->addFieldToFilter('name', 'export_custom_fields')->getFirstItem()->getContent()); $col = Mage::getSingleton('catalog/product')->getCollection()->addFieldToFilter('entity_id', array('in' => $ids))->setStoreId($_fStore->getGroupId())->addAttributeToSelect(array('price', 'image', 'thumbnail', 'type', 'is_salable'))->addAttributeToSelect($customAttributes); foreach ($col->load() as $product) { $values["id"] = $product->getEntityId(); $values["price"] = Mage::helper('core')->currency(getCalculatedPrice($product), false, false); $values["image_link"] = getProductImage($product, 'image'); $values["thumbnail"] = getProductImage($product, 'thumbnail'); $values["type_id"] = $product->getTypeId(); $values["product_sku"] = $product->getSku(); $values["is_salable"] = $product->getIsSalable() == '1' ? "1" : "0"; $catalog_stockItem = $product->getStockItem(); $cataloginventory_stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product); $values["is_in_stock"] = $cataloginventory_stockItem->getIsInStock() ? "1" : "0"; $values["qty"] = (int) $cataloginventory_stockItem->getQty(); $values["min_qty"] = (int) $cataloginventory_stockItem->getMinQty(); if ($bExportProductLink) { $values["link"] = $product->getProductUrl(); } //Process custom attributes. foreach ($customAttributes as $customAttribute) { $values[$customAttribute] = $product->getData($customAttribute) == "" ? "" : trim($product->getResource()->getAttribute($customAttribute)->getFrontend()->getValue($product), " , "); }