-
-
-
- Sub Total :
- Rs. ' . money_format('%!.2i', $alldata['base_subtotal']) . '
-
';
- if (!empty($alldata['coupon_code'])) {
- $finalDetail .= '
-
- Discount (' . $alldata['coupon_code'] . ') :
- Rs. ' . money_format('%!.2i', $alldata['discount_amount']) . '
-
';
- }
- if ($alldata['shipping_amount'] == 0) {
- $shipAmount = "Free Shipping";
- } else {
- $shipAmount = "Rs. " . money_format('%!.2i', $alldata['shipping_amount']);
- }
- $finalDetail .= '
+ public function sendOrderUpdateEmail($notifyCustomer = true, $comment = '')
+ {
+ $smsApiObject = new J2t_Smsgateway_Model_Smsgateway();
+ $customer_country_code = "IN";
+
+ $orderId=$this->getIncrementId();
+ $entityId = $this->getId();
+
+ $write = Mage::getSingleton('core/resource')->getConnection('core_write');
+ $sql= "SELECT entity_id,increment_id "
+ . "FROM sales_flat_order "
+ . "WHERE relation_parent_id='".$entityId."'";
+ $resultset= $write->query($sql);
+ $result=$resultset->fetchAll();
+ if(count($result)==0)
+ {
+
+ $order = Mage::getModel('sales/order')->loadByIncrementId($orderId);
+ $smsContent = "";
+ $thankMsgContent = '';
+
+ $alldata = $order->getData();
+ $grndTotal = money_format('%!.2i', $alldata['grand_total']);
+
+ $method = $order->getPayment()->getMethod();
+
+ if($method == 'cashondelivery') {
+ $paymentMode = 'Placed through COD';
+ } elseif($method == 'banktransfer') {
+ $paymentMode = 'Placed through NEFT';
+ } elseif($method == 'payucheckout_shared') {
+ $paymentMode = 'Paid through PAYU';
+ } elseif($method == 'paytm_cc'){
+ $paymentMode = 'Paid through PAYTM';
+ }
+
+ $thankMsgContent = 'Thank you for confirming your Order # '.$orderId.' .';
+ $thankMsgContent1 = 'Your order has been successfully placed and is being processed.';
+
+ $smsContent = "Dear Customer, Thank you for confirming your order # ". $orderId. " on Tolexo.com. Please check your email or Tolexo Account for further information.";
+
+ $subject = "Your Order # ".$orderId." on Tolexo.com has been successfully placed!";
+
+ $content = $this->getSplitOrderContent($orderId,$entityId);
+
+ $shipping = $order->getShippingAddress();
+ $billing = $order->getBillingAddress();
+ $username = $order->getCustomerFirstname()." ".$order->getCustomerLastname();
+
+ $finalDetail = '
+
+
+
+
+ Sub Total :
+ Rs. '.money_format('%!.2i', $alldata['base_subtotal']).'
+
';
+ if(!empty($alldata['coupon_code'])){
+ $finalDetail .= '
+
+ Discount ('.$alldata['coupon_code'].') :
+ Rs. '.money_format('%!.2i', $alldata['discount_amount']).'
+
';
+ }
+ if($alldata['shipping_amount']==0){
+ $shipAmount = "Free Shipping";
+ }
+ else{
+ $shipAmount = "Rs. ".money_format('%!.2i', $alldata['shipping_amount']);
+ }
+ $finalDetail .= '
Shipping & Handling :
- ' . $shipAmount . '
+ '.$shipAmount.'
Tax :
- Rs. ' . money_format('%!.2i', $alldata['tax_amount']) . '
+ Rs. '.money_format('%!.2i', $alldata['tax_amount']).'
Grand Total :
- Rs. ' . money_format('%!.2i', $alldata['grand_total']) . '
+ Rs. '.money_format('%!.2i', $alldata['grand_total']).'
';
+
+ $mobileNo = $shipping->getTelephone();
+ $smsApiObject->sendSms($mobileNo, $smsContent, $customer_country_code);
+
+ $billAdd = $billing->getStreet();
+ $shipAdd = $shipping->getStreet();
+ $billAdds = '';
+ $shipAdds = '';
+ foreach($billAdd as $val){
+ $billAdds .= $val." ";
+ }
+ foreach($shipAdd as $val){
+ $shipAdds .= $val." ";
+ }
+ $order_bill = $billing->getFirstname()." ".$billing->getMiddlename()." ".$billing->getLastname()."
".$billing->getCompany()."
".$billing->getTelephone()."
". $billAdds." ".$billing->getCity()." ".$billing->getRegion()." ".$billing->getPostcode();
+ $order_ship = $shipping->getFirstname()." ".$shipping->getMiddlename()." ".$shipping->getLastname()."
".$shipping->getCompany()."
".$shipping->getTelephone()."
". $shipAdds." ".$shipping->getCity()." ".$shipping->getRegion()." ".$shipping->getPostcode();
+ $email = array($order->getCustomerEmail());
+ $emailName = array($username);
+ $order_created = $order->getCreatedAtFormated('medium');
+ $templateId = 27;
+ $bccEmail = array('orders@tolexo.com');
+ $sender = array('name' => 'Sales', 'email' => 'support@tolexo.com');
+ $vars = array('order_increment_id' => $orderId, 'item_content' => $content, 'username' => $username, 'order_bill' => $order_bill,'order_ship' => $order_ship,'order_created'=>$order_created,'smsContent'=>$smsContent,'thankMsgContent'=>$thankMsgContent,
+ 'subject'=>$subject,'paymentMode'=>$paymentMode,'thankMsgContent1'=>$thankMsgContent1,'grndTotal'=>$grndTotal,'finalDetail'=>$finalDetail);
+ $storeId = Mage::app()->getStore()->getId();
+ $translate = Mage::getSingleton('core/translate');
+ Mage::getModel('core/email_template')->addBCC($bccEmail)->sendTransactional($templateId, $sender, $email, $emailName, $vars, $storeId);
+ $translate->setTranslateInline(true);
+
+ $sql1 = "UPDATE sales_flat_order sfo "
+ . "SET sfo.email_sent = sfo.email_sent + 1 "
+ . "WHERE sfo.entity_id = '".$entityId."'";
+ $resultset= $write->query($sql1);
+
+ }
+ else{
+
+ $storeId = $this->getStore()->getId();
- $mobileNo = $shipping->getTelephone();
- $smsApiObject->sendSms($mobileNo, $smsContent, $customer_country_code);
-
- $items = $order->getAllItems();
- if(count($items) == 0) return $this;
-
- $billAdd = $billing->getStreet();
- $shipAdd = $shipping->getStreet();
- $billAdds = '';
- $shipAdds = '';
- foreach ($billAdd as $val) {
- $billAdds .= $val . " ";
- }
- foreach ($shipAdd as $val) {
- $shipAdds .= $val . " ";
- }
- $order_bill = $billing->getFirstname() . " " . $billing->getMiddlename() . " " . $billing->getLastname() . "
" . $billing->getCompany() . "
" . $billing->getTelephone() . "
" . $billAdds . " " . $billing->getCity() . " " . $billing->getRegion() . " " . $billing->getPostcode();
- $order_ship = $shipping->getFirstname() . " " . $shipping->getMiddlename() . " " . $shipping->getLastname() . "
" . $shipping->getCompany() . "
" . $shipping->getTelephone() . "
" . $shipAdds . " " . $shipping->getCity() . " " . $shipping->getRegion() . " " . $shipping->getPostcode();
- $email = array($order->getCustomerEmail());
- $emailName = array($username);
- $order_created = $order->getCreatedAtFormated('medium');
- $templateId = 27;
- $bccEmail = array('orders@tolexo.com');
- $sender = array('name' => 'Sales', 'email' => 'support@tolexo.com');
- $vars = array('order_increment_id' => $orderId, 'item_content' => $content, 'username' => $username, 'order_bill' => $order_bill, 'order_ship' => $order_ship, 'order_created' => $order_created, 'smsContent' => $smsContent, 'thankMsgContent' => $thankMsgContent,
- 'subject' => $subject, 'paymentMode' => $paymentMode, 'thankMsgContent1' => $thankMsgContent1, 'grndTotal' => $grndTotal, 'finalDetail' => $finalDetail);
- $storeId = Mage::app()->getStore()->getId();
- $translate = Mage::getSingleton('core/translate');
- Mage::getModel('core/email_template')->addBCC($bccEmail)->sendTransactional($templateId, $sender, $email, $emailName, $vars, $storeId);
- $translate->setTranslateInline(true);
-
- if($emailSent < 1 && empty($childEmailSent)) {
- $sql1 = "UPDATE sales_flat_order sfo "
- . "SET sfo.email_sent = sfo.email_sent + 1 "
- . "WHERE sfo.entity_id = $entityId";
- $write->query($sql1);
- } else if(!empty($childOrders)) {
- $childOrders[] = $entityId;
- $sql1 = "UPDATE sales_flat_order sfo "
- . "SET sfo.email_sent = sfo.email_sent + 1 "
- . "WHERE sfo.entity_id IN (" . implode(',',$childOrders) . ")";
- $write->query($sql1);
- }
- } else {
-
- $storeId = $this->getStore()->getId();
-
- if (!Mage::helper('sales')->canSendOrderCommentEmail($storeId)) {
- return $this;
- }
- // Get the destination email addresses to send copies to
- $copyTo = $this->_getEmails(self::XML_PATH_UPDATE_EMAIL_COPY_TO);
- $copyMethod = Mage::getStoreConfig(self::XML_PATH_UPDATE_EMAIL_COPY_METHOD, $storeId);
- // Check if at least one recepient is found
- if (!$notifyCustomer && !$copyTo) {
- return $this;
- }
+ if (!Mage::helper('sales')->canSendOrderCommentEmail($storeId)) {
+ return $this;
+ }
+ // Get the destination email addresses to send copies to
+ $copyTo = $this->_getEmails(self::XML_PATH_UPDATE_EMAIL_COPY_TO);
+ $copyMethod = Mage::getStoreConfig(self::XML_PATH_UPDATE_EMAIL_COPY_METHOD, $storeId);
+ // Check if at least one recepient is found
+ if (!$notifyCustomer && !$copyTo) {
+ return $this;
+ }
- // Retrieve corresponding email template id and customer name
- if ($this->getCustomerIsGuest()) {
- $templateId = Mage::getStoreConfig(self::XML_PATH_UPDATE_EMAIL_GUEST_TEMPLATE, $storeId);
- $customerName = $this->getBillingAddress()->getName();
- } else {
- $templateId = Mage::getStoreConfig(self::XML_PATH_UPDATE_EMAIL_TEMPLATE, $storeId);
- $customerName = $this->getCustomerName();
- }
-
- $mailer = Mage::getModel('core/email_template_mailer');
- if ($notifyCustomer) {
- $emailInfo = Mage::getModel('core/email_info');
- $emailInfo->addTo($this->getCustomerEmail(), $customerName);
- if ($copyTo && $copyMethod == 'bcc') {
- // Add bcc to customer email
- foreach ($copyTo as $email) {
- $emailInfo->addBcc($email);
- }
- }
- $mailer->addEmailInfo($emailInfo);
- }
+ // Retrieve corresponding email template id and customer name
+ if ($this->getCustomerIsGuest()) {
+ $templateId = Mage::getStoreConfig(self::XML_PATH_UPDATE_EMAIL_GUEST_TEMPLATE, $storeId);
+ $customerName = $this->getBillingAddress()->getName();
+ } else {
+ $templateId = Mage::getStoreConfig(self::XML_PATH_UPDATE_EMAIL_TEMPLATE, $storeId);
+ $customerName = $this->getCustomerName();
+ }
- // Email copies are sent as separated emails if their copy method is
- // 'copy' or a customer should not be notified
- if ($copyTo && ($copyMethod == 'copy' || !$notifyCustomer)) {
- foreach ($copyTo as $email) {
- $emailInfo = Mage::getModel('core/email_info');
- $emailInfo->addTo($email);
- $mailer->addEmailInfo($emailInfo);
+ $mailer = Mage::getModel('core/email_template_mailer');
+ if ($notifyCustomer) {
+ $emailInfo = Mage::getModel('core/email_info');
+ $emailInfo->addTo($this->getCustomerEmail(), $customerName);
+ if ($copyTo && $copyMethod == 'bcc') {
+ // Add bcc to customer email
+ foreach ($copyTo as $email) {
+ $emailInfo->addBcc($email);
+ }
+ }
+ $mailer->addEmailInfo($emailInfo);
+ }
+
+ // Email copies are sent as separated emails if their copy method is
+ // 'copy' or a customer should not be notified
+ if ($copyTo && ($copyMethod == 'copy' || !$notifyCustomer)) {
+ foreach ($copyTo as $email) {
+ $emailInfo = Mage::getModel('core/email_info');
+ $emailInfo->addTo($email);
+ $mailer->addEmailInfo($emailInfo);
+ }
+ }
+
+ // Set all required params and send emails
+ $mailer->setSender(Mage::getStoreConfig(self::XML_PATH_UPDATE_EMAIL_IDENTITY, $storeId));
+ $mailer->setStoreId($storeId);
+ $mailer->setTemplateId($templateId);
+ $mailer->setTemplateParams(array(
+ 'order' => $this,
+ 'comment' => $comment,
+ 'billing' => $this->getBillingAddress()
+ )
+ );
+ //$mailer->send();
+
}
- }
-
- // Set all required params and send emails
- $mailer->setSender(Mage::getStoreConfig(self::XML_PATH_UPDATE_EMAIL_IDENTITY, $storeId));
- $mailer->setStoreId($storeId);
- $mailer->setTemplateId($templateId);
- $mailer->setTemplateParams(array(
- 'order' => $this,
- 'comment' => $comment,
- 'billing' => $this->getBillingAddress()
- )
- );
- //$mailer->send();
- }
+
- return $this;
- }
+ return $this;
+ }
/**
* Send email with order information on COD
*/
+
+
public function getSplitOrderContent($orderId,$entityId)
{
@@ -1632,11 +1617,11 @@ class Mage_Sales_Model_Order extends Mage_Sales_Model_Abstract
if(count($result)==0)
{
$content .= '
- Order ID: '.$orderId.'
- Seller: '.$vendor_name.'
-
-
-
';
+ Order ID: '.$orderId.'
+ Seller: '.$vendor_name.'
+
+
+
';
$iCnt=1;
foreach ($order->getAllItems() as $item)
@@ -1672,7 +1657,7 @@ class Mage_Sales_Model_Order extends Mage_Sales_Model_Abstract
$dispatch = $row['value'];
}
- $orderDate2= $item['created_at'];
+ $orderDate2= $orderItem['created_at'];
if (is_numeric($dispatch))
{
diff --git a/app/code/local/Smartwave/Megamenu/Helper/Data.php b/app/code/local/Smartwave/Megamenu/Helper/Data.php
index 75b7c69..7b437aa 100644
--- a/app/code/local/Smartwave/Megamenu/Helper/Data.php
+++ b/app/code/local/Smartwave/Megamenu/Helper/Data.php
@@ -183,21 +183,4 @@ HTML;
return true;
return false;
}
-
- //added by Jasleen Kaur to get only the main categories
-
- public function getMenuCategories()
- {
- $menuData = Mage::helper('megamenu')->getMenuData();
- extract($menuData);
- // --- Menu Content ---
- $menuContent = '';
- $menuContentArray = array();
- foreach ($_categories as $_category) {
- if ($_category->getIsActive()) {
- $menuContentArray[$_category->getName()] = $_category->getRequestPath();
- }
- }
- return $menuContentArray;
- }
}
\ No newline at end of file
diff --git a/app/code/local/Tolexo/Categoryreorder/Block/Categoryblock.php b/app/code/local/Tolexo/Categoryreorder/Block/Categoryblock.php
deleted file mode 100644
index 3eeef2d..0000000
--- a/app/code/local/Tolexo/Categoryreorder/Block/Categoryblock.php
+++ /dev/null
@@ -1,14 +0,0 @@
-getRequest()->getParams();
- $this->loadLayout();
- if(isset($paramArr['update_catlist'])) {
- $updatedCatArr = json_decode($paramArr['update_catlist'],true);
- $this->updateCategory($updatedCatArr);
- }
-
- $this->renderLayout();
- }
-
- protected function updateCategory($categoryListArr)
- {
- $updatedflag = false;
- foreach($categoryListArr as $key => $catList) {
- $id = $catList['id'];
- $position = $catList['position'];
- $data = array('position' => $position);
- $model = Mage::getModel('catalog/category')->load($id)->addData($data);
- try {
- $model->setId($id)->save();
- $connObj = Mage::getSingleton('core/resource')->getConnection('core_write');
- $result = $connObj->query("update catalog_category_flat_store_1 set position = $position where entity_id = $id");
- $updatedflag = 1;
- } catch (Exception $e){
- $updatedflag = $e->getMessage();
- break;
- }
- }
-
- $block = Mage::app()->getLayout()->getBlock('categoryblock');
- $block->assign(array('updatedFlag'=>$updatedflag));
- }
- public function categoryl2Action()
- {
- $paramArr = Mage::app()->getRequest()->getParams();
- $this->loadLayout();
- if(isset($paramArr['l1catlist'])) {
- $block = Mage::app()->getLayout()->getBlock('categoryblock');
- $block->assign(array('parentId'=>$paramArr['l1catlist']));
- }
- if(isset($paramArr['update_catlist'])) {
- $updatedCatl2Arr = json_decode($paramArr['update_catlist'],true);
- $this->updateCategory($updatedCatl2Arr);
- $block = Mage::app()->getLayout()->getBlock('categoryblock');
- $block->assign(array('parentId'=>$paramArr['parentCatId']));
- }
-
- $this->renderLayout();
- }
- public function categoryl3Action()
- {
- $paramArr = Mage::app()->getRequest()->getParams();
- $this->loadLayout();
- if(isset($paramArr['l1catlist'])) {
- $block = Mage::app()->getLayout()->getBlock('categoryblock');
- $block->assign(array('parentIdl2'=>$paramArr['l1catlist']));
- }
- if(isset($paramArr['l2catlist'])) {
- $block = Mage::app()->getLayout()->getBlock('categoryblock');
- $block->assign(array('parentIdl2'=>$paramArr['parentCatIdl2']));
- $block->assign(array('parentIdl3'=>$paramArr['l2catlist']));
- }
- if(isset($paramArr['update_catlist'])) {
- $updatedCatl3Arr = json_decode($paramArr['update_catlist'],true);
- $this->updateCategory($updatedCatl3Arr);
- $block = Mage::app()->getLayout()->getBlock('categoryblock');
- $block->assign(array('parentIdl2'=>$paramArr['parentCatIdl2']));
- $block->assign(array('parentIdl3'=>$paramArr['parentCatIdl3']));
- }
-
- $this->renderLayout();
- }
-
-}
diff --git a/app/code/local/Tolexo/Categoryreorder/etc/config.xml b/app/code/local/Tolexo/Categoryreorder/etc/config.xml
deleted file mode 100644
index 93451d4..0000000
--- a/app/code/local/Tolexo/Categoryreorder/etc/config.xml
+++ /dev/null
@@ -1,89 +0,0 @@
-
-
-
-
-
- 0.1.0
-
-
-
-
-
-
-
- Tolexo_Categoryreorder_Helper
-
-
-
-
- Tolexo_Categoryreorder_Block
-
-
-
-
-
-
-
- admin
-
- Tolexo_Categoryreorder
- categoryreorder
-
-
-
-
-
-
-
-
- Category Reorder
- 9999
-
-
- L1 Category
- categoryreorder/index/categoryl1
-
-
- L2 Category
- categoryreorder/index/categoryl2
-
-
- L3 Category
- categoryreorder/index/categoryl3
-
-
-
-
-
-
-
-
-
- category reorder
- 9999
-
-
- categoryL1
-
-
- categoryL2
-
-
- categoryL3
-
-
-
-
-
-
-
-
-
-
- categoryreorder.xml
-
-
-
-
-
-
diff --git a/app/code/local/Tolexo/Checkout/controllers/CartController.php b/app/code/local/Tolexo/Checkout/controllers/CartController.php
index ba80901..284670c 100755
--- a/app/code/local/Tolexo/Checkout/controllers/CartController.php
+++ b/app/code/local/Tolexo/Checkout/controllers/CartController.php
@@ -1,9 +1,5 @@
getRequest()->getParams();
$cart = $this->_getCart();
- $cart->init();
- $cartQty = $cart->getQuote()->getItemsCount();
- if(!empty($params['ajaxCart']) && $cartQty > 0) {
- $customerId = $cart->getCustomerSession()->getCustomer()->getId();
- $session = $this->_getSession();
- $quoteId = $session->getQuoteId();
- $cartApiArr = CartSKUnfo($customerId, $quoteId);
- include_once 'cartLayout.php';
- exit();
- } else {
- if ($cartQty) {
- $cart->save();
+ if ($cart->getQuote()->getItemsCount()) {
+ $cart->init();
+ $cart->save();
- if (!$this->_getQuote()->validateMinimumAmount()) {
- $minimumAmount = Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())
- ->toCurrency(Mage::getStoreConfig('sales/minimum_order/amount'));
+ if (!$this->_getQuote()->validateMinimumAmount()) {
+ $minimumAmount = Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())
+ ->toCurrency(Mage::getStoreConfig('sales/minimum_order/amount'));
- $warning = Mage::getStoreConfig('sales/minimum_order/description')
- ? Mage::getStoreConfig('sales/minimum_order/description')
- : Mage::helper('checkout')->__('Minimum order amount is %s', $minimumAmount);
+ $warning = Mage::getStoreConfig('sales/minimum_order/description')
+ ? Mage::getStoreConfig('sales/minimum_order/description')
+ : Mage::helper('checkout')->__('Minimum order amount is %s', $minimumAmount);
- $cart->getCheckoutSession()->addNotice($warning);
- }
+ $cart->getCheckoutSession()->addNotice($warning);
}
+ }
- // Compose array of messages to add
- $messages = array();
- foreach ($cart->getQuote()->getMessages() as $message) {
- if ($message) {
- // Escape HTML entities in quote message to prevent XSS
- $message->setCode(Mage::helper('core')->escapeHtml($message->getCode()));
- $messages[] = $message;
- }
+ // Compose array of messages to add
+ $messages = array();
+ foreach ($cart->getQuote()->getMessages() as $message) {
+ if ($message) {
+ // Escape HTML entities in quote message to prevent XSS
+ $message->setCode(Mage::helper('core')->escapeHtml($message->getCode()));
+ $messages[] = $message;
}
- $cart->getCheckoutSession()->addUniqueMessages($messages);
+ }
+ $cart->getCheckoutSession()->addUniqueMessages($messages);
- /**
- * if customer enteres shopping cart we should mark quote
- * as modified bc he can has checkout page in another window.
- */
- $this->_getSession()->setCartWasUpdated(true);
+ /**
+ * if customer enteres shopping cart we should mark quote
+ * as modified bc he can has checkout page in another window.
+ */
+ $this->_getSession()->setCartWasUpdated(true);
- Varien_Profiler::start(__METHOD__ . 'cart_display');
- $this
+ Varien_Profiler::start(__METHOD__ . 'cart_display');
+ $this
->loadLayout()
->_initLayoutMessages('checkout/session')
->_initLayoutMessages('catalog/session')
->getLayout()->getBlock('head')->setTitle($this->__('Shopping Cart'));
- $this->renderLayout();
- Varien_Profiler::stop(__METHOD__ . 'cart_display');
- }
+ $this->renderLayout();
+ Varien_Profiler::stop(__METHOD__ . 'cart_display');
}
/**
@@ -189,10 +174,10 @@ class Tolexo_Checkout_CartController extends Mage_Core_Controller_Front_Action
*/
public function addAction()
{
- // if (!$this->_validateFormKey()) {
- // $this->_goBack();
- // return;
- // }
+ if (!$this->_validateFormKey()) {
+ $this->_goBack();
+ return;
+ }
$cart = $this->_getCart();
$params = $this->getRequest()->getParams();
try {
@@ -205,23 +190,12 @@ class Tolexo_Checkout_CartController extends Mage_Core_Controller_Front_Action
$product = $this->_initProduct();
$related = $this->getRequest()->getParam('related_product');
- $cartQty = $cart->getQuote()->getItemsCount();
+
/**
* Check product availability
*/
if (!$product) {
- $this->_getSession()->addError($this->__('Product not available.'));
- if(!empty($params['ajaxCart']) && $cartQty > 0) {
- $cart = $this->_getCart();
- $customerId = $cart->getCustomerSession()->getCustomer()->getId();
- $session = $this->_getSession();
- $quoteId = $session->getQuoteId();
- $cartApiArr = CartSKUnfo($customerId, $quoteId);
- include_once 'cartLayout.php';
- exit();
- } else {
- $this->_goBack();
- }
+ $this->_goBack();
return;
}
@@ -242,24 +216,12 @@ class Tolexo_Checkout_CartController extends Mage_Core_Controller_Front_Action
);
if (!$this->_getSession()->getNoCartRedirect(true)) {
- //if (!$cart->getQuote()->getHasError()) {
+ if (!$cart->getQuote()->getHasError()) {
$message = $this->__('%s was added to your shopping cart.', Mage::helper('core')->escapeHtml($product->getName()));
$this->_getSession()->addSuccess($message);
- //}
- if(!empty($params['ajaxCart']) && $cartQty > 0) {
- $cart = $this->_getCart();
- $customerId = $cart->getCustomerSession()->getCustomer()->getId();
- $session = $this->_getSession();
- $quoteId = $session->getQuoteId();
- $cartApiArr = CartSKUnfo($customerId, $quoteId);
-
- include_once 'cartLayout.php';
- exit();
- } else {
- $this->_goBack();
}
+ $this->_goBack();
}
-
} catch (Mage_Core_Exception $e) {
if ($this->_getSession()->getUseNotice(true)) {
$this->_getSession()->addNotice(Mage::helper('core')->escapeHtml($e->getMessage()));
@@ -436,11 +398,11 @@ class Tolexo_Checkout_CartController extends Mage_Core_Controller_Front_Action
*/
public function updatePostAction()
{
- // if (!$this->_validateFormKey()) {
- // $this->_redirect('*/*/');
- // return;
- // }
- $params = $this->getRequest()->getParams();
+ if (!$this->_validateFormKey()) {
+ $this->_redirect('*/*/');
+ return;
+ }
+
$updateAction = (string)$this->getRequest()->getParam('update_cart_action');
switch ($updateAction) {
@@ -454,20 +416,7 @@ class Tolexo_Checkout_CartController extends Mage_Core_Controller_Front_Action
$this->_updateShoppingCart();
}
- $cartQty = Mage::helper('checkout/cart')->getSummaryCount();
- if((!empty($params['ajaxCart'])) && $cartQty > 0) {
- $cart = $this->_getCart();
- $customerId = $cart->getCustomerSession()->getCustomer()->getId();
- $session = $this->_getSession();
- $quoteId = $session->getQuoteId();
- $cartApiArr = CartSKUnfo($customerId, $quoteId);
-
- include_once 'cartLayout.php';
- exit();
- } else {
- $this->_goBack();
- }
-
+ $this->_goBack();
}
/**
@@ -492,7 +441,8 @@ class Tolexo_Checkout_CartController extends Mage_Core_Controller_Front_Action
}
$cartData = $cart->suggestItemsQty($cartData);
- $cart->updateItems($cartData)->save();
+ $cart->updateItems($cartData)
+ ->save();
}
$this->_getSession()->setCartWasUpdated(true);
} catch (Mage_Core_Exception $e) {
@@ -523,36 +473,17 @@ class Tolexo_Checkout_CartController extends Mage_Core_Controller_Front_Action
*/
public function deleteAction()
{
- $params = $this->getRequest()->getParams();
$id = (int) $this->getRequest()->getParam('id');
if ($id) {
try {
$this->_getCart()->removeItem($id)
->save();
- $cartQty = Mage::helper('checkout/cart')->getSummaryCount();
- if($cartQty > 0) {
- $this->_getSession()->addSuccess(
- $this->__('1 Item removed successfully'));
- }
-
} catch (Exception $e) {
$this->_getSession()->addError($this->__('Cannot remove the item.'));
Mage::logException($e);
}
}
- if(!empty($params['ajaxCart']) && $cartQty > 0) {
- $cart = $this->_getCart();
- $customerId = $cart->getCustomerSession()->getCustomer()->getId();
- $session = $this->_getSession();
- $quoteId = $session->getQuoteId();
- $cartApiArr = CartSKUnfo($customerId, $quoteId);
-
- include_once 'cartLayout.php';
- exit();
- } else {
- $this->_goBack();
- }
- //$this->_redirectReferer(Mage::getUrl('*/*'));
+ $this->_redirectReferer(Mage::getUrl('*/*'));
}
/**
@@ -649,20 +580,7 @@ class Tolexo_Checkout_CartController extends Mage_Core_Controller_Front_Action
Mage::logException($e);
}
- $params = $this->getRequest()->getParams();
-
- if(!empty($params['ajaxCart'])) {
- $cart = $this->_getCart();
- $customerId = $cart->getCustomerSession()->getCustomer()->getId();
- $session = $this->_getSession();
- $quoteId = $session->getQuoteId();
- $cartApiArr = CartSKUnfo($customerId, $quoteId);
-
- include_once 'cartLayout.php';
- exit();
- } else {
- $this->_goBack();
- }
+ $this->_goBack();
}
/**
diff --git a/app/code/local/Tolexo/Checkout/controllers/cartLayout.php b/app/code/local/Tolexo/Checkout/controllers/cartLayout.php
deleted file mode 100644
index 1ee6b2b..0000000
--- a/app/code/local/Tolexo/Checkout/controllers/cartLayout.php
+++ /dev/null
@@ -1,343 +0,0 @@
-
-getLayout()->createBlock('gtm/gtm')->getAjaxCartPageData();
-$cartArr = $cartApiArr['data'];
-?>
-
-
-
Shopping Cart
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Estimate Shipping and Tax
-
-
-
-
-
-
-
-
-
- '; setLayerData('CartPage', 'Cart Page', 'Proceed To Checkout', 'Proceed To Checkout'); onCheckoutOption(1, 'Proceed To Checkout');">
-
-
- Proceed to Checkout
-
-
-
- Continue Shopping
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/code/local/Tolexo/OrderTags/Helper/Data.php b/app/code/local/Tolexo/OrderTags/Helper/Data.php
deleted file mode 100644
index 6181db2..0000000
--- a/app/code/local/Tolexo/OrderTags/Helper/Data.php
+++ /dev/null
@@ -1,12 +0,0 @@
-_init("ordertag/tagmaster", "tag_id");
- }
-}
\ No newline at end of file
diff --git a/app/code/local/Tolexo/OrderTags/Model/Observer.php b/app/code/local/Tolexo/OrderTags/Model/Observer.php
deleted file mode 100644
index d4e10ef..0000000
--- a/app/code/local/Tolexo/OrderTags/Model/Observer.php
+++ /dev/null
@@ -1,26 +0,0 @@
-getRequest()->getParam('order_id');
- $quote = $observer->getEvent()->getQuote();
- $quoteId = $quote->getId();
-
- if (! empty($oldOrderId)) {
- $resource = Mage::getSingleton('core/resource');
- // get connection objects to execute direct queries
- $writeConn = $resource->getConnection('core_write');
- $q = "UPDATE sales_flat_quote SET orig_order_id=$oldOrderId WHERE entity_id=$quoteId";
- $data = $writeConn->query($q);
- }
- }
-}
\ No newline at end of file
diff --git a/app/code/local/Tolexo/OrderTags/etc/adminhtml.xml b/app/code/local/Tolexo/OrderTags/etc/adminhtml.xml
deleted file mode 100644
index d8c94f9..0000000
--- a/app/code/local/Tolexo/OrderTags/etc/adminhtml.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
- Order Tag
-
-
-
-
-
-
-
-
-
-
diff --git a/app/code/local/Tolexo/OrderTags/etc/config.xml b/app/code/local/Tolexo/OrderTags/etc/config.xml
deleted file mode 100644
index 5ab08bb..0000000
--- a/app/code/local/Tolexo/OrderTags/etc/config.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
-
-
- 0.0.1
-
-
-
-
-
-
-
- singleton
- Tolexo_OrderTags_Model_Observer
- updateQuoteOnReorder
-
-
-
-
-
-
-
-
- Tolexo_Ordertag_Model
- ordertag_mysql4
-
-
- Tolexo_Ordertag_Model_Mysql4
-
-
- sales_flat_order_tag_master
-
-
-
-
-
-
-
- Tolexo_OrderTags_Helper
-
-
-
-
-
-
- Tolexo_OrderTags
-
-
- core_setup
-
-
-
-
-
\ No newline at end of file
diff --git a/app/code/local/Tolexo/OrderTags/etc/system.xml b/app/code/local/Tolexo/OrderTags/etc/system.xml
deleted file mode 100644
index 08afcfb..0000000
--- a/app/code/local/Tolexo/OrderTags/etc/system.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
-
- separator-top
- Order Tag
- sales
- text
- 40
- 1
- 0
- 0
-
-
- General
- text
- 10
- 1
- 0
- 0
-
-
- Corporate admin users
- text
- 191
- 1
- 0
- 0
- Please provide comma separated id's of the corporate admin users
-
-
- Telesales users
- text
- 192
- 1
- 0
- 0
- Please provide comma separated id's of the tele sales users
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/code/local/Tolexo/OrderTags/sql/ordertag_setup/mysql4-install-0.0.1.php b/app/code/local/Tolexo/OrderTags/sql/ordertag_setup/mysql4-install-0.0.1.php
deleted file mode 100644
index 4eb9f4a..0000000
--- a/app/code/local/Tolexo/OrderTags/sql/ordertag_setup/mysql4-install-0.0.1.php
+++ /dev/null
@@ -1,64 +0,0 @@
-startSetup();
-
-$installer->run("
- DROP TABLE IF EXISTS `{$this->getTable('ordertag/tagmaster')}`;
- CREATE TABLE `{$installer->getTable('ordertag/tagmaster')}` (
- `tag_id` INT(10) NOT NULL AUTO_INCREMENT,
- `tag_name` VARCHAR(50) NOT NULL COMMENT 'Backend, Web, App, Edited, Corporate, Alternate, Customer, First, Repeat, Repeat-A (One order delivered), Reorder, Fresh',
- `description` VARCHAR(255) NULL,
- PRIMARY KEY (`tag_id`)) ENGINE = InnoDB;
-
- INSERT INTO `sales_flat_order_tag_master`
- ( `tag_name`, `description`) VALUES
- ('Backend', 'Backend'),
- ('Web', 'Web'),
- ('App', 'App'),
- ('Edited', 'Edited'),
- ('Corporate', 'Corporate'),
- ('Alternate', 'Alternate'),
- ('Repeat', 'Repeat'),
- ('Repeat-A', 'Repeat-A(One order delivered)'),
- ('Reorder', 'Reorder'),
- ('Telesales', 'Telesales');
-
- Alter table `sales_flat_order_info`
- ADD `placed_from` INT(10) NULL COMMENT 'Backend \nApp\nWeb' AFTER `utm_source`,
- ADD `created_by` INT(10) NULL COMMENT 'Edited - Order created by Customer Care\nCorporate - Order created by a specific Admin\nAlternate - Order created by backend script\nCusomer - Order created by normal customer' AFTER `placed_from`,
- ADD `repeat_sequence` INT(10) NULL COMMENT 'First - First Order of that customer\nRepeat - One order already placed by that customer\nRepat-A - One order already delivered to that customer' AFTER `created_by`,
- ADD `fresh_or_reorder` INT(10) NULL COMMENT 'Reorder - By clicking on Reorder button from Admin\nFresh - Without clicking Reorder button by Admin / Customer' AFTER `repeat_sequence`,
- ADD `purchase_admin_id` INT(10) NULL COMMENT 'Store NULL or admin_id that are designated as Corporate Admin (defined in core_config_data table)' AFTER `fresh_or_reorder`,
- ADD `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP AFTER `created_at`,
- ADD INDEX `fk_placed_from_1_idx` (`placed_from` ASC),
- ADD INDEX `fk_created_by_1_idx` (`created_by` ASC),
- ADD INDEX `fk_repeat_sequence_1_idx` (`repeat_sequence` ASC),
- ADD INDEX `fk_fresh_or_reorder_1_idx` (`fresh_or_reorder` ASC),
- ADD CONSTRAINT `fk_placed_from_1`
- FOREIGN KEY (`placed_from`)
- REFERENCES `sales_flat_order_tag_master` (`tag_id`)
- ON DELETE NO ACTION
- ON UPDATE NO ACTION,
- ADD CONSTRAINT `fk_created_by_1`
- FOREIGN KEY (`created_by`)
- REFERENCES `sales_flat_order_tag_master` (`tag_id`)
- ON DELETE NO ACTION
- ON UPDATE NO ACTION,
- ADD CONSTRAINT `fk_repeat_sequence_1`
- FOREIGN KEY (`repeat_sequence`)
- REFERENCES `sales_flat_order_tag_master` (`tag_id`)
- ON DELETE NO ACTION
- ON UPDATE NO ACTION,
- ADD CONSTRAINT `fk_fresh_or_reorder_1`
- FOREIGN KEY (`fresh_or_reorder`)
- REFERENCES `sales_flat_order_tag_master` (`tag_id`)
- ON DELETE NO ACTION
- ON UPDATE NO ACTION;
-
- Alter table {$this->getTable('sales/order')} ADD `purchase_admin_id` int(10) unsigned DEFAULT NULL After purchase_from;
-
- Alter table {$this->getTable('sales/order_grid')} ADD `order_tags` varchar(255) DEFAULT NULL After billing_name;
-");
-
-$installer->endSetup();
-?>
\ No newline at end of file
diff --git a/app/code/local/Tolexo/Splitorder/Model/Observer.php b/app/code/local/Tolexo/Splitorder/Model/Observer.php
index ec6eada..4bd7fc1 100644
--- a/app/code/local/Tolexo/Splitorder/Model/Observer.php
+++ b/app/code/local/Tolexo/Splitorder/Model/Observer.php
@@ -317,31 +317,28 @@ class Tolexo_Splitorder_Model_Observer extends Varien_Event_Observer {
}
}
} catch (Exception $e) {
- $error = $e->getMessage();
- Mage::log("Split Order Code for $oldOrderId, $product, $oldStatus \n $error", null, 'SplitOrder.log', true);
+ echo $e->getMessage();
}
return $newOrderId;
}
function canceledOldOrder($orderId, $entityId) {
try {
+
$sql1 = "UPDATE sales_flat_order sfo,sales_flat_order_grid sfog "
. "SET sfo.state = 'canceled', sfo.status = 'cancel_split_order', sfog.status = 'cancel_split_order' "
. "WHERE sfo.entity_id = sfog.entity_id "
. "AND sfo.entity_id = '" . $entityId . "'";
$this->writeConnection->query($sql1);
- $sql1 = "UPDATE sales_flat_order_item SET qty_canceled = (qty_ordered - qty_invoiced) WHERE order_id = $entityId;";
- $this->writeConnection->query($sql1);
-
$currentTime = date('Y-m-d H:i:s');
$sql = "INSERT INTO `sales_flat_order_status_history` "
. "(`parent_id`,`is_customer_notified`,`status`,`comment`,`created_at`,`entity_name`,`username`) "
. "values( " . $entityId . ",0,'cancel_split_order' ,'Cancel Split Order','" . $currentTime . "','order','System Generated')";
$this->writeConnection->query($sql);
} catch (Exception $e) {
- $error = $e->getMessage();
- Mage::log("Split Order Code Error $orderId\n $error", null, 'SplitOrder.log', true);
+ Mage::logException($e);
+ echo $e->getMessage();
}
}
@@ -349,29 +346,18 @@ class Tolexo_Splitorder_Model_Observer extends Varien_Event_Observer {
$smsContent = "";
$thankMsgContent = '';
$finalDetail = '';
- $order = Mage::getModel('sales/order')->loadByIncrementId($orderId);
- $order_created = $order->getCreatedAtFormated('medium');
-
$sql = "SELECT entity_id,increment_id "
. "FROM sales_flat_order "
. "WHERE relation_parent_id='" . $entityId . "'";
$resSet = $this->readConnection->query($sql);
$result = $resSet->fetchAll();
if (count($result) != 0) {
- $thankMsgContent = 'Thank you for confirming your order.';
+ $thankMsgContent = 'Thank you for confirming your Transaction # ' . $orderId . ' .';
$thankMsgContent1 = 'Your order has been successfully placed and is being processed. We have grouped your Order items seller-wise and listed under separate order IDs.';
- $boldOrderNumber = '';
- } else {
- $boldOrderNumber = '
-
- Your Transaction # '.$orderId.'
- (placed on '.$order_created.')
-
- ';
}
$content = $this->getSplitOrderContent($orderId, $entityId);
-
+ $order = Mage::getModel('sales/order')->loadByIncrementId($orderId);
$shipping = $order->getShippingAddress();
$billing = $order->getBillingAddress();
$username = $order->getCustomerFirstname() . " " . $order->getCustomerLastname();
@@ -394,13 +380,25 @@ class Tolexo_Splitorder_Model_Observer extends Varien_Event_Observer {
$paymentMode = 'Paid through PAYTM';
}
- if ($noI > 1) {
- $itm = $itemName . "... and " . ($noI - 1) . " other item(s)";
+
+ if ($method == 'banktransfer') {
+ $smsContent = 'Dear Customer, Thank you for confirming your order # ' . $orderId . ' on Tolexo.com. Please check your email or Tolexo Account for further information.';
+ $subject = 'Your Order # ' . $orderId . ' on Tolexo.com has been successfully placed!';
} else {
- $itm = $itemName . "... ";
+ if (Mage::getDesign()->getArea() == 'adminhtml') {
+ $smsContent = 'Dear Customer, Thank you for confirming your order # ' . $orderId . ' on Tolexo.com. Please check your email or Tolexo Account for further information.';
+ $subject = 'Your Order # ' . $orderId . ' on Tolexo.com has been successfully placed!';
+ } else {
+ if ($noI > 1) {
+ $itm = $itemName . "... and " . ($noI - 1) . " other item(s)";
+ } else {
+ $itm = $itemName . "... ";
+ }
+ $smsContent = "Dear Customer, Thank you for placing order for " . $itm . " on Tolexo.com. We will get in touch with you for further communication very soon.";
+ $subject = 'Your New Order on Tolexo.com has been successfully placed!';
+ }
+
}
- $smsContent = "Dear Customer, Thank you for placing order for " . $itm . " on Tolexo.com. We will get in touch with you for further communication very soon.";
- $subject = 'Your New Order on Tolexo.com has been successfully placed!';
$finalDetail = '
@@ -457,21 +455,24 @@ class Tolexo_Splitorder_Model_Observer extends Varien_Event_Observer {
$order_ship = $shipping->getFirstname() . " " . $shipping->getMiddlename() . " " . $shipping->getLastname() . " " . $shipping->getCompany() . " " . $shipping->getTelephone() . " " . $shipAdds . " " . $shipping->getCity() . " " . $shipping->getRegion() . " " . $shipping->getPostcode();
$email = array($order->getCustomerEmail());
$emailName = array($username);
-
+ $order_created = $order->getCreatedAtFormated('medium');
$templateId = 25;
$bccEmail = array('orders@tolexo.com');
$sender = array('name' => 'Sales', 'email' => 'support@tolexo.com');
$vars = array('order_increment_id' => $orderId, 'item_content' => $content, 'username' => $username, 'order_bill' => $order_bill, 'order_ship' => $order_ship, 'order_created' => $order_created, 'smsContent' => $smsContent, 'thankMsgContent' => $thankMsgContent,
- 'subject' => $subject, 'paymentMode' => $paymentMode, 'thankMsgContent1' => $thankMsgContent1, 'grndTotal' => $grndTotal, 'finalDetail' => $finalDetail, 'highlight_OrderId'=>$boldOrderNumber);
+ 'subject' => $subject, 'paymentMode' => $paymentMode, 'thankMsgContent1' => $thankMsgContent1, 'grndTotal' => $grndTotal, 'finalDetail' => $finalDetail);
$storeId = Mage::app()->getStore()->getId();
$translate = Mage::getSingleton('core/translate');
Mage::getModel('core/email_template')->addBCC($bccEmail)->sendTransactional($templateId, $sender, $email, $emailName, $vars, $storeId);
$translate->setTranslateInline(true);
- $sql1 = "UPDATE sales_flat_order sfo SET sfo.email_sent = 2 WHERE sfo.entity_id = '" . $entityId . "'";
+ $sql1 = "UPDATE sales_flat_order sfo "
+ . "SET sfo.email_sent = sfo.email_sent + 1 "
+ . "WHERE sfo.entity_id = '" . $entityId . "'";
$this->writeConnection->query($sql1);
+
}
function getSplitOrderContent($orderId, $entityId) {
@@ -584,35 +585,4 @@ class Tolexo_Splitorder_Model_Observer extends Varien_Event_Observer {
}
return $content;
}
-
- // Add Order Data in queue Table
- public function pushOrderToQueue($observer)
- {
- $order = $observer->getEvent()->getOrder();
- $orderId = $order->getId();
- $orderData = $order->getData();
- $orderData['purchase_admin_id'] = NULL;
- $adminSession = Mage::getSingleton('admin/session');
-
- $quoteId = $order->getQuoteId();
- $childId = $order->getRelationChildId();
- $parentId = $order->getRelationParentId();
- if (! empty($childId) || ! empty($parentId)) {
- $sql = "UPDATE sales_flat_quote SET orig_order_id = '0' WHERE entity_id=$quoteId";
- $this->writeConnection->query($sql);
- }
-
- $sql = "SELECT COUNT(entity_id) AS count FROM sales_flat_order_status_history WHERE parent_id = '" . $orderId . "';";
- $result = $this->readConnection->query($sql)->fetch();
- $count = intval($result['count']);
-
- if ($adminSession->isLoggedIn() && $count <= 1) {
- $orderData['purchase_admin_id'] = $adminSession->getUser()->getUserId();
- }
-
- $orderData['store_name'] = implode(",", explode("\n", $orderData['store_name']));
- $json_order = json_encode($orderData);
- $query = "INSERT INTO `sales_order_queue` (`order_id`,`order_data`) VALUES ($orderId,'" . $json_order . "') ";
- $this->writeConnection->query($query);
- }
}
\ No newline at end of file
diff --git a/app/code/local/Tolexo/Splitorder/etc/config.xml b/app/code/local/Tolexo/Splitorder/etc/config.xml
index c4c28f5..e12b2ce 100644
--- a/app/code/local/Tolexo/Splitorder/etc/config.xml
+++ b/app/code/local/Tolexo/Splitorder/etc/config.xml
@@ -14,11 +14,6 @@
Tolexo_Splitorder_Model_Observer
splitMethod
-
- singleton
- Tolexo_Splitorder_Model_Observer
- pushOrderToQueue
-
diff --git a/app/code/local/Unbxd/Autosuggest/Block/Index.php b/app/code/local/Unbxd/Autosuggest/Block/Index.php
old mode 100755
new mode 100644
diff --git a/app/code/local/Unbxd/Autosuggest/Helper/Data.php b/app/code/local/Unbxd/Autosuggest/Helper/Data.php
old mode 100755
new mode 100644
diff --git a/app/code/local/Unbxd/Autosuggest/controllers/IndexController.php b/app/code/local/Unbxd/Autosuggest/controllers/IndexController.php
old mode 100755
new mode 100644
diff --git a/app/code/local/Unbxd/Autosuggest/etc/config.xml b/app/code/local/Unbxd/Autosuggest/etc/config.xml
old mode 100755
new mode 100644
diff --git a/app/code/local/Unbxd/Search/Block/Catalog/Layer/Filter/Attribute.php b/app/code/local/Unbxd/Search/Block/Catalog/Layer/Filter/Attribute.php
old mode 100755
new mode 100644
diff --git a/app/code/local/Unbxd/Search/Block/Catalog/Layer/Filter/Boolean.php b/app/code/local/Unbxd/Search/Block/Catalog/Layer/Filter/Boolean.php
old mode 100755
new mode 100644
diff --git a/app/code/local/Unbxd/Search/Block/Catalog/Layer/Filter/Category.php b/app/code/local/Unbxd/Search/Block/Catalog/Layer/Filter/Category.php
old mode 100755
new mode 100644
diff --git a/app/code/local/Unbxd/Search/Block/Catalog/Layer/Filter/Decimal.php b/app/code/local/Unbxd/Search/Block/Catalog/Layer/Filter/Decimal.php
old mode 100755
new mode 100644
diff --git a/app/code/local/Unbxd/Search/Block/Catalog/Layer/Filter/Price.php b/app/code/local/Unbxd/Search/Block/Catalog/Layer/Filter/Price.php
old mode 100755
new mode 100644
diff --git a/app/code/local/Unbxd/Search/Block/Catalog/Layer/View.php b/app/code/local/Unbxd/Search/Block/Catalog/Layer/View.php
old mode 100755
new mode 100644
diff --git a/app/code/local/Unbxd/Search/Helper/AnalyticsHelper.php b/app/code/local/Unbxd/Search/Helper/AnalyticsHelper.php
old mode 100755
new mode 100644
diff --git a/app/code/local/Unbxd/Search/Helper/Catalogsearch.php b/app/code/local/Unbxd/Search/Helper/Catalogsearch.php
old mode 100755
new mode 100644
diff --git a/app/code/local/Unbxd/Search/Helper/Data.php b/app/code/local/Unbxd/Search/Helper/Data.php
old mode 100755
new mode 100644
diff --git a/app/code/local/Unbxd/Search/Helper/Unbxdsearch.php b/app/code/local/Unbxd/Search/Helper/Unbxdsearch.php
old mode 100755
new mode 100644
diff --git a/app/code/local/Unbxd/Search/Model/Adminhtml/System/Config/Backend/Engine.php b/app/code/local/Unbxd/Search/Model/Adminhtml/System/Config/Backend/Engine.php
old mode 100755
new mode 100644
diff --git a/app/code/local/Unbxd/Search/Model/Adminhtml/System/Config/Source/Engine.php b/app/code/local/Unbxd/Search/Model/Adminhtml/System/Config/Source/Engine.php
old mode 100755
new mode 100644
diff --git a/app/code/local/Unbxd/Search/Model/Adminhtml/System/Config/Source/Power.php b/app/code/local/Unbxd/Search/Model/Adminhtml/System/Config/Source/Power.php
old mode 100755
new mode 100644
diff --git a/app/code/local/Unbxd/Search/Model/Catalog/Layer.php b/app/code/local/Unbxd/Search/Model/Catalog/Layer.php
old mode 100755
new mode 100644
diff --git a/app/code/local/Unbxd/Search/Model/Catalog/Layer/Filter/Attribute.php b/app/code/local/Unbxd/Search/Model/Catalog/Layer/Filter/Attribute.php
old mode 100755
new mode 100644
diff --git a/app/code/local/Unbxd/Search/Model/Catalog/Layer/Filter/Boolean.php b/app/code/local/Unbxd/Search/Model/Catalog/Layer/Filter/Boolean.php
old mode 100755
new mode 100644
diff --git a/app/code/local/Unbxd/Search/Model/Catalog/Layer/Filter/Category.php b/app/code/local/Unbxd/Search/Model/Catalog/Layer/Filter/Category.php
old mode 100755
new mode 100644
diff --git a/app/code/local/Unbxd/Search/Model/Catalog/Layer/Filter/Decimal.php b/app/code/local/Unbxd/Search/Model/Catalog/Layer/Filter/Decimal.php
old mode 100755
new mode 100644
diff --git a/app/code/local/Unbxd/Search/Model/Catalog/Layer/Filter/Price.php b/app/code/local/Unbxd/Search/Model/Catalog/Layer/Filter/Price.php
old mode 100755
new mode 100644
diff --git a/app/code/local/Unbxd/Search/Model/Catalogsearch/Layer.php b/app/code/local/Unbxd/Search/Model/Catalogsearch/Layer.php
old mode 100755
new mode 100644
diff --git a/app/code/local/Unbxd/Search/Model/Catalogsearch/Layer/Filter/Attribute.php b/app/code/local/Unbxd/Search/Model/Catalogsearch/Layer/Filter/Attribute.php
old mode 100755
new mode 100644
diff --git a/app/code/local/Unbxd/Search/Model/Resource/Catalog/Product/Collection.php b/app/code/local/Unbxd/Search/Model/Resource/Catalog/Product/Collection.php
old mode 100755
new mode 100644
diff --git a/app/code/local/Unbxd/Search/Model/Resource/Engine/Abstract.php b/app/code/local/Unbxd/Search/Model/Resource/Engine/Abstract.php
old mode 100755
new mode 100644
diff --git a/app/code/local/Unbxd/Search/Model/Resource/Engine/Unbxdsearch/Client.php b/app/code/local/Unbxd/Search/Model/Resource/Engine/Unbxdsearch/Client.php
old mode 100755
new mode 100644
diff --git a/app/code/local/Unbxd/Searchcore/Model/Feed/Feedconfig.php b/app/code/local/Unbxd/Searchcore/Model/Feed/Feedconfig.php
deleted file mode 100644
index 92bd286..0000000
--- a/app/code/local/Unbxd/Searchcore/Model/Feed/Feedconfig.php
+++ /dev/null
@@ -1,110 +0,0 @@
-_includeSchema = $status;
- }
-
- public function isSchemaToBeIncluded() {
- if (array_key_exists("schema", $_GET)){
- $this->_includeSchema = ($_GET["schema"] == "true")?true:false;
- }
- return $this->_includeSchema;
- }
-
- public function setProductInclusion($status=true) {
- $this->_includeProduct = $status;
- }
-
- public function isProductToBeIncluded() {
- if (array_key_exists("product", $_GET)){
- $this->_includeProduct = ($_GET["product"] == "true")?true:false;
- }
- return $this->_includeProduct;
- }
-
- public function isCatalogIncluded() {
- return $this->isSchemaToBeIncluded() || $this->isProductToBeIncluded();
- }
-
- public function setTaxonomyNodeInclusion($status=true) {
- $this->_includeTaxonomyNodes = $status;
- }
-
- public function isTaxonomyNodeToBeIncluded() {
- if (array_key_exists("taxonomy-node", $_GET)){
- $this->_includeTaxonomyNodes = ($_GET["taxonomy-node"] == "true")?true:false;
- }
-
- return $this->_includeTaxonomyNodes;
- }
-
-
- public function setTaxonomyMappingInclusion($status=true) {
- $this->_includeTaxonomyMapping = $status;
- }
-
- public function isTaxonomyMappingToBeIncluded() {
- if (array_key_exists("taxonomy-mapping", $_GET)){
- $this->_includeTaxonomyMapping= ($_GET["taxonomy-mapping"] == "true")?true:false;
- }
-
- return $this->_includeTaxonomyMapping;
- }
-
- public function isTaxonomyIncluded() {
- return $this->isTaxonomyNodeToBeIncluded() || $this->isTaxonomyMappingToBeIncluded();
- }
-
-
- public function setPage($page = 0) {
- $this->page = (int)$page;
- return $this;
- }
-
- public function setLimit($limit = 500) {
- $this->limit = (int)$limit;
- if($limit < $this->pageSize) {
- $this->pageSize = (int)$limit;
- }
- return $this;
- }
-
-
- public function setTaxonomyPage($taxPage) {
- $this->taxonomyStart = $taxPage;
- return $this;
- }
-
- public function getTaxonomyPage() {
- return $this->taxonomyStart;
- }
-
- public function setTaxonomyLimit($taxLimit) {
- $this->taxonomyLimit = $taxLimit;
- return $this;
- }
-
- public function getTaxonomyLimit() {
- return $this->taxonomyLimit;
- }
-
-}
diff --git a/app/code/local/Unbxd/Searchcore/Model/Feed/Feedcreator.php b/app/code/local/Unbxd/Searchcore/Model/Feed/Feedcreator.php
old mode 100644
new mode 100755
index 71551f7..c5020e7
--- a/app/code/local/Unbxd/Searchcore/Model/Feed/Feedcreator.php
+++ b/app/code/local/Unbxd/Searchcore/Model/Feed/Feedcreator.php
@@ -1,6 +1,6 @@
fileName = $fileName;
}
+ public function setPage($page = 0) {
+ $this->page = (int)$page;
+ return $this;
+ }
+
+ public function setLimit($limit = 500) {
+ $this->limit = (int)$limit;
+ if($limit < $this->pageSize) {
+ $this->pageSize = (int)$limit;
+ }
+ return $this;
+ }
+
/**
* Method to set the full upload
* @param bool $value
@@ -70,26 +85,17 @@ class Unbxd_Searchcore_Model_Feed_Feedcreator extends Unbxd_Searchcore_Model_Fee
* @return bool
*/
protected function _writeFeedContent(Mage_Core_Model_Website $website, $currentDate) {
- if(!$this->_appendTofile('{"feed":{')) {
+ if(!$this->_appendTofile('{"feed":')) {
$this->log("Error writing feed tag");
return false;
}
- if($this->isCatalogIncluded()) {
- if(!$this->_writeCatalogContent($website, $currentDate)) {
- $this->log("Error writing catalog tag");
- return false;
- }
- }
-
- if($this->isTaxonomyIncluded()) {
- if (!$this->_writeTaxonomyContents($website)) {
- return false;
- }
- }
-
- if(!$this->_appendTofile("}}")) {
+ if(!$this->_writeCatalogContent($website, $currentDate)) {
+ $this->log("Error writing catalog tag");
+ return false;
+ }
+ if(!$this->_appendTofile("}")) {
$this->log("Error writing closing feed tag");
return false;
}
@@ -105,38 +111,31 @@ class Unbxd_Searchcore_Model_Feed_Feedcreator extends Unbxd_Searchcore_Model_Fee
* @return bool
*/
protected function _writeCatalogContent(Mage_Core_Model_Website $website, $currentDate) {
- if (!$this->_appendTofile('"catalog":{')) {
+ if(!$this->_appendTofile('{"catalog":{')) {
$this->log("Error writing closing catalog tag");
return false;
}
- if($this->isSchemaToBeIncluded()) {
- if(!$this->_writeSchemaContent()) {
- return false;
- }
- }
+ if(!$this->_writeSchemaContent()) {
+ return false;
+ }
+
+ if(!$this->_appendTofile(",")) {
+ $this->log("Error while adding comma in catalog");
+ return false;
+ }
- if($this->isSchemaToBeIncluded() && $this->isProductToBeIncluded()) {
- if (!$this->_appendTofile(",")) {
- $this->log("Error while adding comma in catalog");
- return false;
- }
- }
$fromDate = Mage::getResourceSingleton('unbxd_searchcore/config')
->getValue($website->getWebsiteId(), Unbxd_Searchcore_Model_Config::LAST_UPLOAD_TIME);
if(is_null($fromDate)) {
$fromDate = "1970-01-01 00:00:00";
}
-
-if($this->isProductToBeIncluded()) {
- // If both of them are unsuccessful, then tag it as unsuccessful
- if (!($this->_writeAddProductsContent($website, $fromDate, $currentDate)
- || $this->_writeDeleteProductsContent($website, $fromDate, $currentDate))
- ) {
- return false;
- }
- Mage::getModel('unbxd_searchcore/sync')->markItSynced($website->getWebsiteId(), $currentDate);
- }
-
+ // If both of them are unsuccessful, then tag it as unsuccessful
+ if(!($this->_writeAddProductsContent($website, $fromDate, $currentDate)
+ || $this->_writeDeleteProductsContent($website, $fromDate, $currentDate))) {
+ return false;
+ }
+
+ Mage::getModel('unbxd_searchcore/sync')->markItSynced($website->getWebsiteId(), $currentDate);
if(!$this->_appendTofile("}")) {
@@ -148,6 +147,10 @@ if($this->isProductToBeIncluded()) {
return false;
}*/
+ if(!$this->_appendTofile("}")) {
+ $this->log("Error writing closing feed tag");
+ return false;
+ }
return true;
}
@@ -164,12 +167,7 @@ if($this->isProductToBeIncluded()) {
public function getSize(Mage_Core_Model_Website $website, $fromDate, $currentDate) {
$collection = $this->_getCatalogCollectionToAdd($website, $fromDate, $currentDate);
return $collection->getSize();
- }
- public function getTaxonomySize(Mage_Core_Model_Website $website) {
- $collection = $this->getTaxonomyMappingCollection();
- #return sizeof($collection);
- return $collection->getSize();
}
/**
@@ -329,7 +327,7 @@ if($this->isProductToBeIncluded()) {
return true;
}
- protected function _writeTaxonomyContents(Mage_Core_Model_Website $website){
+ protected function _writeTaxonomyContents($site){
$collection=$this->getTaxonomyMappingCollection();
// get total size
@@ -339,72 +337,44 @@ if($this->isProductToBeIncluded()) {
$pageNum = 0;
$this->log('started writing taxonomy tree');
- if (!$this->_appendTofile($this->isCatalogIncluded()?',':'')) {
+ if(!$this->_appendTofile(',"'. 'taxonomy' . '":{ "tree":[')) {
$this->log("Error while adding tree tag");
return false;
}
- if(!$this->_appendTofile('"'. 'taxonomy' . '":{')) {
- $this->log("Error while adding tree tag");
- return false;
- }
- if($this->isTaxonomyNodeToBeIncluded()) {
- if (!$this->_appendTofile('"tree":[')) {
- $this->log("Error while adding tree tag");
- return false;
- }
- $content = Mage::getSingleton('unbxd_searchcore/feed_jsonbuilder_taxonomybuilder')
- ->createTaxonomyFeed($website->getName());
- $status = $this->_appendTofile($content);
+ $content=Mage::getSingleton('unbxd_searchcore/feed_jsonbuilder_taxonomybuilder')
+ ->createTaxonomyFeed($site);
+ $status=$this->_appendTofile($content);
- if (!$status) {
- $this->log("Error while addings taxonomy");
- return false;
- }
-
- if (!$this->_appendTofile("]")) {
- $this->log("Error writing closing tree tag");
- return false;
- }
+ if(!$status){
+ $this->log("Error while addings taxonomy");
+ return false;
}
- if($this->isTaxonomyNodeToBeIncluded() && $this->isTaxonomyMappingToBeIncluded()) {
- if (!$this->_appendTofile(',')) {
- $this->log("Error while adding tree tag");
- return false;
- }
- }
+ if(!$this->_appendTofile("]")) {
+ $this->log("Error writing closing tree tag");
+ return false;
+ }
- if($this->isTaxonomyMappingToBeIncluded()) {
- if (!$this->_appendTofile('"mapping":[')) {
- $this->log("Error writing opening mapping tag");
- return false;
- }
- $collection=$this->getTaxonomyMappingCollection();
- if(is_null($this->getTaxonomyPage()) || $this->getTaxonomyPage() < 0) {
- $collection->load();
- } else {
- $collection->load($this->getTaxonomyPage(), $this->getTaxonomyLimit());
- }
- $content = Mage::getSingleton('unbxd_searchcore/feed_jsonbuilder_taxonomybuilder')->createMappingFeed($collection);
- $status = $this->_appendTofile($content);
-
- if (!$status) {
- $this->log("Error while addings taxonomy");
- return false;
- }
+ if(!$this->_appendTofile(',"mapping":[')) {
+ $this->log("Error writing opening mapping tag");
+ return false;
+ }
- if (!$this->_appendTofile(']')) {
- $this->log("Error writing closing mapping tag");
- return false;
- }
- }
- if(!$this->_appendTofile('}')) {
- $this->log("Error writing closing mapping tag");
+ $content=Mage::getSingleton('unbxd_searchcore/feed_jsonbuilder_taxonomybuilder')->createMappingFeed($collection);
+ $status=$this->_appendTofile($content);
+
+ if(!$status){
+ $this->log("Error while addings taxonomy");
return false;
}
+
+ if(!$this->appendTofile(']}')) {
+ $this->log("Error writing closing mapping tag");
+ return false;
+ }
$this->log('Added all categories');
- return true;
+ return true;
}
protected function _setCopyFields(Mage_Core_Model_Website $website) {
@@ -572,13 +542,7 @@ $this->fields["tsin"]= Mage::getModel('unbxd_searchcore/field')->getField('sku',
$this->fields["tsinAssociated"]= Mage::getModel('unbxd_searchcore/field')->getField('sku', "true", "false");
$this->fields["msrp"]= Mage::getModel('unbxd_searchcore/field')->getField('decimal', "true", "false");
$this->fields["sizeAssociated"]= Mage::getModel('unbxd_searchcore/field')->getField('text', "true", "false");
-$this->fields["small_image"]= Mage::getModel('unbxd_searchcore/field')->getField('text', "false", "false");
- //mostviewed
- $this->fields["most_viewed"]= Mage::getModel('unbxd_searchcore/field')->getField('number', "false", "false");
- $this->fields["bestsellers"]= Mage::getModel('unbxd_searchcore/field')->getField('number', "false", "false");
- $this->fields["saving"]= Mage::getModel('unbxd_searchcore/field')->getField('decimal', "false", "false");
- $this->fields["psku"]= Mage::getModel('unbxd_searchcore/field')->getField('text', "true", "false");
- $this->fields["imageLink"]= Mage::getModel('unbxd_searchcore/field')->getField('link', "true", "false");
+$this->fields["small_image"]= Mage::getModel('unbxd_searchcore/field')->getField('link', "false", "false");
$this->_setImageConf($website);
}
@@ -608,7 +572,17 @@ $this->fields["small_image"]= Mage::getModel('unbxd_searchcore/field')->getField
}
public function getTaxonomyMappingCollection() {
- return Mage::getResourceModel('unbxd_searchcore/taxonomy_collection');
+ try{
+ $adapter = Mage::getSingleton('core/resource')->getConnection('core_read');
+ return $adapter->query("select catalog_category_product_index.product_id as entity_id,GROUP_CONCAT(catalog_category_product_index.category_id SEPARATOR ',') as category_id FROM catalog_category_product_index
+ join catalog_product_entity where catalog_category_product_index.product_id = catalog_product_entity.entity_id
+ group by catalog_category_product_index.product_id");
+ } catch(Exception $e) {
+ $this->log($e->getMessage());
+ }
+
+
}
+
}
?>
diff --git a/app/code/local/Unbxd/Searchcore/Model/Feed/Feedmanager.php b/app/code/local/Unbxd/Searchcore/Model/Feed/Feedmanager.php
index 9ab51c4..c459fc2 100755
--- a/app/code/local/Unbxd/Searchcore/Model/Feed/Feedmanager.php
+++ b/app/code/local/Unbxd/Searchcore/Model/Feed/Feedmanager.php
@@ -208,7 +208,7 @@ class Unbxd_Searchcore_Model_Feed_Feedmanager {
}
}
- public function getProducts(Mage_Core_Model_Website $website, $page = 0, $limit = 500, $taxonomyPageNumber = 0, $taxonomyPageLimit = -1) {
+ public function getProducts(Mage_Core_Model_Website $website, $page = 0, $limit = 500) {
$response = $this->init($website, true);
if (is_array($response)) {
return $response;
@@ -217,21 +217,19 @@ class Unbxd_Searchcore_Model_Feed_Feedmanager {
$this->_triggerSearchComplete($website);
Mage::getSingleton('unbxd_searchcore/feed_filemanager')->setNoFile(true);
- //try {
+ try {
// create the feed
$status = Mage::getSingleton('unbxd_searchcore/feed_feedcreator')
->setFullUpload(true)
->setPage($page)
- ->setTaxonomyPage($taxonomyPageNumber)
- ->setTaxonomyLimit($taxonomyPageLimit)
->setLimit($limit)
->createFeed($this->fileName, $website, $currentDate);
$this->log('unbxd Datafeeder finished creating file');
- /*} catch (Exception $e) {
+ } catch (Exception $e) {
$this->log('Caught exception: ' . $e->getMessage());
$status = false;
$errorMsg = $e->getMessage();
- } */
+ }
if($status) {
return Mage::getSingleton('unbxd_searchcore/feed_filemanager')->getContent($this->fileName);
} else {
@@ -250,11 +248,6 @@ class Unbxd_Searchcore_Model_Feed_Feedmanager {
}
- public function getTaxonomySize(Mage_Core_Model_Website $website) {
- return Mage::getSingleton('unbxd_searchcore/feed_feedcreator')
- ->getTaxonomySize($website);
- }
-
public function log($message) {
Mage::helper('unbxd_searchcore')->log(Zend_Log::DEBUG, $message);
}
diff --git a/app/code/local/Unbxd/Searchcore/Model/Feed/Jsonbuilder/Productbuilder.php b/app/code/local/Unbxd/Searchcore/Model/Feed/Jsonbuilder/Productbuilder.php
old mode 100644
new mode 100755
index d95a06f..4c6422c
--- a/app/code/local/Unbxd/Searchcore/Model/Feed/Jsonbuilder/Productbuilder.php
+++ b/app/code/local/Unbxd/Searchcore/Model/Feed/Jsonbuilder/Productbuilder.php
@@ -56,7 +56,6 @@ class Unbxd_Searchcore_Model_Feed_Jsonbuilder_Productbuilder extends
*/
public function skipProduct(Mage_Core_Model_Website $website, $product) {
$filters = $this->_getFeedHelper()->getFilters($website);
-
foreach($filters as $key=>$filter) {
if($this->_getFeedHelper()->isMultiSelect($key)) {
$values = $this->_getMultiSelectAttribute($key, $product);
@@ -84,18 +83,6 @@ class Unbxd_Searchcore_Model_Feed_Jsonbuilder_Productbuilder extends
}
}
}
-
- if($product->getData('type_id') == "simple"){
- /* if($product->getData('psku')){
- return true;
- }*/
- $parentIds = Mage::getModel('catalog/product_type_configurable')->getParentIdsByChild($product->getData("entity_id"));
- if(sizeof($parentIds) > 0) {
- return true;
- }
- }
-
-
return false;
}
@@ -140,7 +127,7 @@ class Unbxd_Searchcore_Model_Feed_Jsonbuilder_Productbuilder extends
public function getProduct(Mage_Core_Model_Website $website, $product, $fields, $copyFields, $childProduct = false) {
$productArray =array();
-
+
foreach($product->getData('') as $columnHeader=>$columndata){
// if($childProduct){
@@ -158,14 +145,14 @@ class Unbxd_Searchcore_Model_Feed_Jsonbuilder_Productbuilder extends
}
}
-
+
if(!$childProduct) {
// if($this->_getFeedHelper()
// ->isConfigTrue($website, Unbxd_Searchcore_Helper_Constants::INCLUDE_CHILD_PRODUCT)) {
-
- $productArray = $this->addChildrens($website, $product, $fields, $copyFields, $productArray);
+
+ $productArray = $this->addChildrens($website, $product, $fields, $copyFields, $productArray);
// }
$category = $this->_getCategoryAttribute($product);
@@ -179,14 +166,8 @@ class Unbxd_Searchcore_Model_Feed_Jsonbuilder_Productbuilder extends
if(!is_null($tsinValue)) {
$productArray["tsin"] = $tsinValue;
- }
-
- if(array_key_exists('small_image', $productArray)) {
- $productArray["imageLink"]="http://img.tolexokit.com//media/catalog/product" . $productArray["small_image"] . "?resize=1&q=95&w=135&h=135&zc=2";
-
- }
-
-
+ }
+
if(array_key_exists('final_price', $fields)) {
$productArray['final_price'] = $product->getFinalPrice();
}
@@ -197,24 +178,19 @@ class Unbxd_Searchcore_Model_Feed_Jsonbuilder_Productbuilder extends
$productArray["final_price"]=$product->getFinalPrice();
$productArray["price"]=$product->getPrice();
$productArray["url_path"]=$product->getProductUrl();
- if ($product->getData('msrp') != 0){
- $productArray["saving"] = (($product->getData('msrp') - $product->getFinalPrice())*100/$product->getData('msrp'));
- }
+
$msrp_value = $product->getData("msrp");
- if($product->getData("visibility") != 4) {
- $productArray[Unbxd_Searchcore_Model_Resource_Field::AVAILABILITY] ="false";
- }
- if(!is_null($msrp_value)) {
+ if(!is_null($msrp_value)) {
$productArray["msrp"] = $msrp_value;
}
}
else {
- // echo $product->getData("tsin");
- if($product->getData("tsin")) {
- $productArray["tsinAssociated"]=$product->getData("tsin");
- }
+ // echo $product->getData("tsin");
+ if($product->getData("tsin")) {
+ $productArray["tsinAssociated"]=$product->getData("tsin");
+ }
}
return $productArray;
@@ -338,10 +314,10 @@ class Unbxd_Searchcore_Model_Feed_Jsonbuilder_Productbuilder extends
*/
public function addChildrens(Mage_Core_Model_Website $website, $product, $fields, $copyFields, $productArray) {
-
+
$type = $product->getData('type_id');
if ($type == "configurable" || $type == "grouped" ) {
-
+
$associatedProducts = array();
$conf = Mage::getModel('catalog/product_type_configurable')->setProduct($product);
$childrens = $conf->getUsedProductCollection()
@@ -350,20 +326,20 @@ class Unbxd_Searchcore_Model_Feed_Jsonbuilder_Productbuilder extends
->joinField("qtyAssociated", "cataloginventory_stock_item", 'qty', 'product_id=entity_id', null, 'left');
foreach ($childrens as $children)
{
- $childProduct = $this->getProduct($website, $children, $fields, $copyFields, true);
+ $childProduct = $this->getProduct($website, $children, $fields, $copyFields, true);
if(isset($childProduct) && sizeof($childProduct) > 0 ) {
-
+
$childProduct = $this->postProcessProduct($childProduct, $fields, true);
$associatedProducts[] = $childProduct;
}
}
if( sizeof($associatedProducts) > 0) {
-
+
$productArray["associatedProducts"] = $associatedProducts;
}
return $productArray;
} else {
-
+
return $productArray;
}
}
diff --git a/app/code/local/Unbxd/Searchcore/Model/Feed/Jsonbuilder/Taxonomybuilder.php b/app/code/local/Unbxd/Searchcore/Model/Feed/Jsonbuilder/Taxonomybuilder.php
index aeeb92e..44cf933 100755
--- a/app/code/local/Unbxd/Searchcore/Model/Feed/Jsonbuilder/Taxonomybuilder.php
+++ b/app/code/local/Unbxd/Searchcore/Model/Feed/Jsonbuilder/Taxonomybuilder.php
@@ -1,68 +1,65 @@
file = Mage::getBaseDir('tmp').DS.'unbxdTaxonomy.xml';
- }
-
- /**
- * Function to appened the contents to the file
- */
- private function appendTofile($content){
-
- try{
-
- file_put_contents($this->file, $content, FILE_APPEND);
- return true;
- }catch(Exception $Ex){
- error_log("UNBXD_MODULE:Error while appending the contents to file");
- error_log($Ex->getMessage());
- return false;
- }
- }
-
- private function log($message){
- Mage::helper('unbxd_searchcore')->log(Zend_Log::DEBUG, $message);
- }
-
- /**
- * Function to delete the file
- */
- private function deleteFile(){
- unlink($this->file);
- }
-
-
+ }
+
+ /**
+ * Function to appened the contents to the file
+ */
+ private function appendTofile($content){
+
+ try{
+
+ file_put_contents($this->file, $content, FILE_APPEND);
+ return true;
+ }catch(Exception $Ex){
+ error_log("UNBXD_MODULE:Error while appending the contents to file");
+ error_log($Ex->getMessage());
+ return false;
+ }
+ }
+
+ private function log($content){
+ try{
+ file_put_contents($this->logFile, date('Y-m-d H:i:s').$content."\n", FILE_APPEND);
+ return true;
+ }catch(Exception $Ex){
+ error_log("UNBXD_MODULE:Error while appending the contents to file");
+ Mage::throwException($Ex->getMessage());
+ return false;
+ }
+ }
+
+ /**
+ * Function to delete the file
+ */
+ private function deleteFile(){
+ unlink($this->file);
+ }
+
+
private function writeJSONProductsContents($site){
$stores= $this->getStores($site);
- $content='';
- $categoryIds = array();
foreach( $stores as $store){
- $categories=$this->getStoreCategories($store);
+ $categories=$this->getStoreCategories($store);
+ $content='';
+ $count=0;
foreach($categories as $category){
- $category_obj = Mage::getModel('catalog/category')->load($category->getId());
- if(!is_null($category_obj) && $category_obj->getName()== "" ){
+ if( $category->getName()== "" ){
continue;
}
- if(!array_key_exists($category->getId(), $categoryIds)) {
- $content =$content.$this->getCategoryContent($category_obj);
- $categoryIds[] = $category->getId();
- }
+ $content =$content.$this->getCategoryContent($category);
+ $category_obj = Mage::getModel('catalog/category')->load($category->getId());
$childrens = $category_obj->getAllChildren(true);
- $childrenCategories = Mage::getResourceSingleton('catalog/category_collection')
- ->addIdFilter($childrens)
- ->addAttributeToSelect('*')
- ->load();
-
+ $childrenCategories = Mage::getModel('catalog/category')->getCollection()->addIdFilter($childrens)->addAttributeToSelect('*')->load();
+
foreach($childrenCategories as $childCategory){
- $childCategory = Mage::getModel('catalog/category')->load($childCategory->getId());
- if(!array_key_exists($childCategory->getId(), $categoryIds)) {
- $content=$content.$this->getCategoryContent($childCategory);
- $categoryIds[] = $childCategory->getId();
- }
+ $content=$content.$this->getCategoryContent($childCategory);
}
}
}
@@ -71,118 +68,142 @@ class Unbxd_Searchcore_Model_Feed_Jsonbuilder_Taxonomybuilder {
private function getCategoryContent($category){
$content=array();
- $content["nodeName"]= $category->getName();
- $content["parentNodeId"] = array((string)$category->getParentId());
- $content["nodeId"] =(string)$category->getId();
- return json_encode($content).',';
+ $content["nodeName"]= $category->getName();
+ $content["parentNodeId"] = array((string)$category->getParentId());
+ $content["nodeId"] =(string)$category->getId();
+ return json_encode($content).',';
}
-
+
+
+
+ private function getAllCategories($site){
+ $collection = Mage::getModel('catalog/category')->getCollection()
+ ->setStoreId($this->getStores($site))
+ ->addAttributeToSelect('name')
+ ->addAttributeToSelect('id');
+
+ return $collection->load();
+
+ }
+
private function getStores($site){
- $sites=Mage::app()->getWebsites();
- foreach( $sites as $eachSite){
- if(strcasecmp ( $eachSite->getName(), $site ) == 0 ){
- return $eachSite->getStores();
- }
- }
+ $sites=Mage::app()->getWebsites();
+ foreach( $sites as $eachSite){
+ if(strcasecmp ( $eachSite->getName(), $site ) == 0 ){
+ return $eachSite->getStores();
+ }
+ }
}
+
+
+
+ private function getAttributesInJSON($columnHeader,$columndata){
+
+ return '"'.$columnHeader.'"'.':'.'"'.$content.'"';
+ }
+
+ private function _escapeXMLHeader($columnHeader){
+
+ return str_replace(' ','_',$columnHeader);
+ }
+
+
+
+ public function createTaxonomyFeed($site){
- public function createTaxonomyFeed($site){
-
- $content=$this->writeJSONProductsContents($site);
-
- if(!$content){
- return false;
- }
- $this->log('writing content');
-
- return rtrim($content, ",");;
- }
+ $content=$this->writeJSONProductsContents($site);
+
+ if(!$content){
+ return false;
+ }
+ $this->log('writing content');
- public function createMappingFeed($collection){
+ return rtrim($content, ",");;
+ }
- $content=$this->writeJSONMappingContents($collection);
+ public function createMappingFeed($collection){
- if(!$content){
+ $content=$this->writeJSONMappingContents($collection);
+
+ if(!$content){
- return false;
- }
+ return false;
+ }
- $this->log('writing content');
+ $this->log('writing content');
- return rtrim($content, ",");
+ return rtrim($content, ",");
- }
+ }
- private function writeJSONMappingContents($collection)
- {
- $content='';
- foreach($collection as $mapping) {
+ private function writeJSONMappingContents($collection)
+ {
+ $content='';
+ foreach($collection as $mapping) {
- $content =$content.$this->getMappingContent( $mapping);
- }
- return $content;
+ $content =$content.$this->getMappingContent( $mapping);
+ }
+ return $content;
- }
+ }
- private function getMappingContent($mapping){
+ private function getMappingContent($mapping){
$content=array();
- $content["uniqueId"]= (string)$mapping['entity_id'];
- $content["nodeId"] = explode(",", $mapping['category_id']);
- return json_encode($content).',';
- }
-
- public function validateSite($site){
- $sites=Mage::app()->getWebsites();
- if( !isset($site) || $site == "") {
- return false;
- }
- foreach( $sites as $eachSite){
- if(strcasecmp ( $eachSite->getName(), $site ) == 0 ){
- return $eachSite->getWebsiteId();
- }
- }
- return -1;
+ $content["uniqueId"]= (string)$mapping['entity_id'];
+ $content["nodeId"] = explode(",", $mapping['category_id']);
+ return json_encode($content).',';
}
-
- public function getStoreCategories($store, $sorted=false, $asCollection=false, $toLoad=true)
- {
- $parent = $store->getRootCategoryId();
-
- /**
- * Check if parent node of the store still exists
- */
- $category = Mage::getModel('catalog/category');
- /* @var $category Mage_Catalog_Model_Category */
- if (!$category->checkId($parent)) {
- if ($asCollection) {
- return new Varien_Data_Collection();
- }
- return array();
- }
-
- $recursionLevel = max(0, (int) Mage::app()->getStore()->getConfig('catalog/navigation/max_depth'));
+
+ public function validateSite($site){
+ $sites=Mage::app()->getWebsites();
+ if( !isset($site) || $site == "") {
+ return false;
+ }
+ foreach( $sites as $eachSite){
+ if(strcasecmp ( $eachSite->getName(), $site ) == 0 ){
+ return $eachSite->getWebsiteId();
+ }
+ }
+ return -1;
+ }
+
+ public function getStoreCategories($store, $sorted=false, $asCollection=false, $toLoad=true)
+ {
+ $parent = $store->getRootCategoryId();
+
+ /**
+ * Check if parent node of the store still exists
+ */
+ $category = Mage::getModel('catalog/category');
+ /* @var $category Mage_Catalog_Model_Category */
+ if (!$category->checkId($parent)) {
+ if ($asCollection) {
+ return new Varien_Data_Collection();
+ }
+ return array();
+ }
+
+ $recursionLevel = max(0, (int) Mage::app()->getStore()->getConfig('catalog/navigation/max_depth'));
$tree = Mage::getResourceModel('catalog/category_tree');
- /* @var $tree Mage_Catalog_Model_Resource_Category_Tree */
- $nodes = $tree->loadNode($parent)
- ->loadChildren($recursionLevel)
- ->getChildren();
- //added to fetch non flat data all the time
- $emptyResourceModel = Mage::getResourceSingleton('catalog/category_collection');
- $tree->addCollectionData($emptyResourceModel, $sorted, $parent, $toLoad, false);
- if ($asCollection) {
- return $tree->getCollection();
- }
- return $nodes;
- }
-
-
-
+ /* @var $tree Mage_Catalog_Model_Resource_Category_Tree */
+ $nodes = $tree->loadNode($parent)
+ ->loadChildren($recursionLevel)
+ ->getChildren();
+
+ $tree->addCollectionData(null, $sorted, $parent, $toLoad, false);
+ if ($asCollection) {
+ return $tree->getCollection();
+ }
+ return $nodes;
+ }
+
+
+
public function updateAction($action,$value){
- Mage::getResourceSingleton("datafeeder/conf")->updateAction($action, $value);
- }
+ Mage::getResourceSingleton("datafeeder/conf")->updateAction($action, $value);
+ }
}
?>
-
diff --git a/app/code/local/Unbxd/Searchcore/Model/Resource/Product/Collection.php b/app/code/local/Unbxd/Searchcore/Model/Resource/Product/Collection.php
index 1faba41..82b997b 100755
--- a/app/code/local/Unbxd/Searchcore/Model/Resource/Product/Collection.php
+++ b/app/code/local/Unbxd/Searchcore/Model/Resource/Product/Collection.php
@@ -81,29 +81,25 @@ class Unbxd_Searchcore_Model_Resource_Product_Collection extends
{
$adapter = Mage::getSingleton("core/resource");
$visiblityCondition = array('in' => array(2,3,4));
- $storeId = $website->getDefaultStore()->getId();
$_catalogInventoryTable = method_exists($adapter, 'getTableName')
? $adapter->getTableName('cataloginventory_stock_item') : 'catalog_category_product_index';
- $adapter = $this->getConnection();
$this
->addWebsiteFilter($website->getWebsiteId())
->joinField("qty", $_catalogInventoryTable, 'qty', 'product_id=entity_id', null, 'left')
- ->joinField("bestsellers", $this->getTable('amsorting/bestsellers'),"bestsellers",
- 'id=entity_id'/* AND mostviewed.store_id=?',$storeId */
- , null, 'left')
- -> joinField('most_viewed', $this->getTable('amsorting/most_viewed'), "most_viewed", 'id=entity_id'/* AND store_id=' . $storeId*/, null, 'left')
->addAttributeToSelect('*')
- //->addAttributeToFilter('status',1)
+ ->addAttributeToFilter('status',1)
+ ->addAttributeToFilter('visibility',4)
->addCategoryIds()
+ ->addAttributeToFilter('visibility',$visiblityCondition)
->addPriceData(Mage_Customer_Model_Group::NOT_LOGGED_IN_ID, $website->getWebsiteId());
- /*if (!Mage::helper('unbxd_searchcore')
+ if (!Mage::helper('unbxd_searchcore')
->isConfigTrue($website, Unbxd_Searchcore_Helper_Constants::INCLUDE_OUT_OF_STOCK)) {
Mage::getSingleton('cataloginventory/stock')->addInStockFilterToCollection($this);
- }*/
+ }
- //Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($this);
+ Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($this);
#Mage::getSingleton('catalog/product_visibility')->addVisibleInSiteFilterToCollection($this);
return $this;
}
diff --git a/app/code/local/Unbxd/Searchcore/Model/Resource/Taxonomy/Collection.php b/app/code/local/Unbxd/Searchcore/Model/Resource/Taxonomy/Collection.php
deleted file mode 100755
index e8d8e13..0000000
--- a/app/code/local/Unbxd/Searchcore/Model/Resource/Taxonomy/Collection.php
+++ /dev/null
@@ -1,97 +0,0 @@
-_data === null) {
- $this->_renderFilters()
- ->_renderOrders()
- ->_renderLimit();
- if(!is_null($select)){
- $this->_select = $select;
- }
- $this->_data = $this->_fetchAll($this->_select);
- $this->_afterLoadData();
- }
- return $this->_data;
- }
-
- public function getTaxonomyQuery($start, $limit) {
- return "select catalog_category_product_index.product_id as entity_id,GROUP_CONCAT(catalog_category_product_index.category_id SEPARATOR ',') as category_id FROM catalog_category_product_index
- join catalog_product_entity on catalog_category_product_index.product_id = catalog_product_entity.entity_id
- group by catalog_category_product_index.product_id ". ((!is_null($limit))?(" LIMIT ".$limit):"")." OFFSET " .$start ;
- }
-
- public function load($start = 0, $limit = null,$select=null, $printQuery = false, $logQuery = false){
- if ($this->isLoaded()) {
- return $this;
- }
- $this->_idFieldName = "entity_id";
- if($select == null) {
- $select = $this->getTaxonomyQuery($start, $limit);
- }
- $this->_beforeLoad();
-
- /* $this->_renderFilters()
- ->_renderOrders()
- ->_renderLimit();*/
-
- $this->printLogQuery($printQuery, $logQuery);
-
- $data = $this->getData($select);
- $this->resetData();
-
- if (is_array($data)) {
- foreach ($data as $row) {
- $item = $this->getNewEmptyItem();
- $item->setIdFieldName("entity_id");
- $item->addData($row);
- $this->addItem($item);
- }
- }
-
- $this->_setIsLoaded();
- $this->_afterLoad();
- return $this;
- }
-
- /**
- * Get SQL for get record count
- *
- * @return Varien_Db_Select
- */
- public function getSelectCountSql()
- {
- return "select count(distinct catalog_category_product_index.product_id) FROM catalog_category_product_index
- join catalog_product_entity on catalog_category_product_index.product_id = catalog_product_entity.entity_id";
- }
-
- /**
- * Adding item to item array
- *
- * @param Varien_Object $item
- * @return Varien_Data_Collection
- */
- public function addItem(Varien_Object $item)
- {
- $itemId = $this->_getItemId($item);
-
- if (!is_null($itemId)) {
- if (isset($this->_items[$itemId])) {
- throw new Exception('Item ('.get_class($item).') with the same id "'.$item->getId().'" already exist');
- }
- $this->_items[$itemId] = $item;
- } else {
- $this->_addItem($item);
- }
- return $this;
- }
-}
diff --git a/app/code/local/Unbxd/Searchcore/controllers/CatalogController.php b/app/code/local/Unbxd/Searchcore/controllers/CatalogController.php
index 17dbdfc..6e2b662 100755
--- a/app/code/local/Unbxd/Searchcore/controllers/CatalogController.php
+++ b/app/code/local/Unbxd/Searchcore/controllers/CatalogController.php
@@ -95,15 +95,13 @@ class Unbxd_Searchcore_CatalogController extends Mage_Core_Controller_Front_Acti
set_time_limit(0);
$page = $this->getRequest()->getParam('start', 0);
$limit = $this->getRequest()->getParam('limit', 500);
- $taxonomyStart =$this->getRequest()->getParam('tax-start', 0);
- $taxonomyLimit = $this->getRequest()->getParam('tax-limit', -1);
$isFullUpload = true;
$feedMgr = Mage::getSingleton('unbxd_searchcore/feed_feedmanager');
if(array_key_exists('incremental', $_REQUEST)) {
$isFullUpload = false;
}
- $response = $feedMgr->getProducts($website, $page, $limit, $taxonomyStart, $taxonomyLimit);
+ $response = $feedMgr->getProducts($website, $page, $limit);
$this->getResponse()->setBody($response);
return;
}
@@ -116,12 +114,7 @@ class Unbxd_Searchcore_CatalogController extends Mage_Core_Controller_Front_Acti
}
$feedMgr = Mage::getSingleton('unbxd_searchcore/feed_feedmanager');
$size = $feedMgr->getSize($website);
- $responseArray = array('size'=> $size);
- if(array_key_exists("taxonomy", $_GET) && $_GET["taxonomy"] == true) {
- $taxonomySize = $feedMgr->getTaxonomySize($website);
- $responseArray["taxonomySize"] = $taxonomySize;
- }
- $response = json_encode($responseArray);
+ $response = json_encode(array('size'=> $size));
$this->getResponse()->setBody($response);
return;
}
diff --git a/app/code/local/nodeapp/home.php b/app/code/local/nodeapp/home.php
index 091a1ef..cc298d4 100644
--- a/app/code/local/nodeapp/home.php
+++ b/app/code/local/nodeapp/home.php
@@ -1,10 +1,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/design/adminhtml/default/default/layout/main.xml b/app/design/adminhtml/default/default/layout/main.xml
index 1689181..5b4f9f0 100644
--- a/app/design/adminhtml/default/default/layout/main.xml
+++ b/app/design/adminhtml/default/default/layout/main.xml
@@ -55,8 +55,6 @@ Default layout, loads most of the pages
Magento Admin
-
-
js extjs/fix-defer-before.js can_load_ext_js
@@ -80,9 +78,7 @@ Default layout, loads most of the pages
-
- ../../../../js/categoryreorder/css/style.css
-
+
reset.css
boxes.css
custom.css
diff --git a/app/design/adminhtml/default/default/template/categoryreorder/categoryL1.phtml b/app/design/adminhtml/default/default/template/categoryreorder/categoryL1.phtml
deleted file mode 100644
index 8f8e361..0000000
--- a/app/design/adminhtml/default/default/template/categoryreorder/categoryL1.phtml
+++ /dev/null
@@ -1,46 +0,0 @@
-Re-order L1 Category
-
-".$updatedFlag;
- }
- ?>
-
-
-
-getCollection()
- ->addAttributeToSelect('*')
- ->addAttributeToFilter('is_active',array('eq' => 1))
- ->addAttributeToFilter('level',array('eq' => 2))
- ->addOrderField('position');
-?>
-
-
diff --git a/app/design/adminhtml/default/default/template/categoryreorder/categoryL2.phtml b/app/design/adminhtml/default/default/template/categoryreorder/categoryL2.phtml
deleted file mode 100644
index 0de2028..0000000
--- a/app/design/adminhtml/default/default/template/categoryreorder/categoryL2.phtml
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-Re-order L2 Category
-
-".$updatedFlag;
- }
- ?>
-
-
-
-getCollection()
- ->addAttributeToSelect('*')
- ->addAttributeToFilter('is_active',array('eq' => 1))
- ->addAttributeToFilter('level',array('eq' => 2))
- ->addOrderField('position');
-?>
-
-
-
-
- getCollection()
- ->addAttributeToSelect('*')
- ->addAttributeToFilter('is_active',array('eq' => 1))
- ->addAttributeToFilter('level',array('eq' => 3))
- ->addAttributeToFilter('parent_id',array('eq' => $parentId))
- ->addOrderField('position');
- ?>
-
-
-
-
-
diff --git a/app/design/adminhtml/default/default/template/categoryreorder/categoryL3.phtml b/app/design/adminhtml/default/default/template/categoryreorder/categoryL3.phtml
deleted file mode 100644
index f2c40dd..0000000
--- a/app/design/adminhtml/default/default/template/categoryreorder/categoryL3.phtml
+++ /dev/null
@@ -1,148 +0,0 @@
-
-
-Re-order L3 Category
-
-".$updatedFlag;
- }
- ?>
-
-
-
-getCollection()
- ->addAttributeToSelect('*')
- ->addAttributeToFilter('is_active',array('eq' => 1))
- ->addAttributeToFilter('level',array('eq' => 2))
- ->addOrderField('position');
-?>
-
-
-
-
-
-
-
- getCollection()
- ->addAttributeToSelect('*')
- ->addAttributeToFilter('is_active',array('eq' => 1))
- ->addAttributeToFilter('level',array('eq' => 3))
- ->addAttributeToFilter('parent_id',array('eq' => $parentIdl2))
- ->addOrderField('position');
- ?>
-
-
-
-
-
-
- getCollection()
- ->addAttributeToSelect('*')
- ->addAttributeToFilter('is_active',array('eq' => 1))
- ->addAttributeToFilter('level',array('eq' => 4))
- ->addAttributeToFilter('parent_id',array('eq' => $parentIdl3))
- ->addOrderField('position');
- ?>
-
-
-
-
diff --git a/app/design/adminhtml/default/default/template/sales/items/column/name.phtml b/app/design/adminhtml/default/default/template/sales/items/column/name.phtml
index ce7ac31..61bb88b 100644
--- a/app/design/adminhtml/default/default/template/sales/items/column/name.phtml
+++ b/app/design/adminhtml/default/default/template/sales/items/column/name.phtml
@@ -34,8 +34,7 @@
escapeHtml($_item->getName()) ?>
helper('sales')->__('SKU') ?>: ', Mage::helper('catalog')->splitSku($this->escapeHtml($this->getSku()))).' '; ?>
loadByAttribute('sku',$this->getSku());
-$prdt= Mage::getModel('catalog/product')->load($_item->getProductId());
+$prdt= Mage::getModel('catalog/product')->loadByAttribute('sku',$this->getSku());
$delivery_details = $prdt->getDeliveryDetails();
$ds= Mage::getModel('catalog/product')->getResource()->getAttribute("delivery_details");
$basePrice = $_item->getTolexoBasePrice();
diff --git a/app/design/adminhtml/default/default/template/sales/order/view/info.phtml b/app/design/adminhtml/default/default/template/sales/order/view/info.phtml
index 2040ddb..e53af3d 100644
--- a/app/design/adminhtml/default/default/template/sales/order/view/info.phtml
+++ b/app/design/adminhtml/default/default/template/sales/order/view/info.phtml
@@ -65,10 +65,6 @@ $orderStoreDate = $this->formatDate($_order->getCreatedAtStoreDate(), 'medium',
__('Purchased From') ?>
getOrderStoreName() ?>
-
- __('Order Tags') ?>
- getOrderTags() ?>
-
getRelationChildId()): ?>
__('Link to the New Order') ?>
diff --git a/app/design/adminhtml/default/mageworks/template/export/export.phtml b/app/design/adminhtml/default/mageworks/template/export/export.phtml
index db37244..a518b6f 100644
--- a/app/design/adminhtml/default/mageworks/template/export/export.phtml
+++ b/app/design/adminhtml/default/mageworks/template/export/export.phtml
@@ -21,7 +21,11 @@ $downLoadCommentCsv = $parts[0] . '/' . $parts[1] . '/' . $parts[2] .'/download.
$downLoadFullCancel = $parts[0] . '/' . $parts[1] . '/' . $parts[2] .'/download.php?q=sampleFullCancel';
$cancelPartialOrderurl = $parts[0] . '/' . $parts[1] . '/' . $parts[2] .'/cancelPartialOrder.php';
$downLoadPartialCancel = $parts[0] . '/' . $parts[1] . '/' . $parts[2] .'/download.php?q=samplePartialCancel';
-
+//$key1 = 'http://localhost/magento/miniOrderReport.php';
+//$reorderurl = 'http://localhost/magento/creatOrder.php';
+//$cancelFullOrderurl = 'http://localhost/magento/cancelBulkOrder.php';
+//$bulkCommentOrderurl = 'http://localhost/magento/bulkOrderComment.php';
+//$partialReorderurl = 'http://localhost/magento/createPartialOrder.php';
?>
diff --git a/app/design/frontend/base/default/template/checkout/cart/coupon.phtml b/app/design/frontend/base/default/template/checkout/cart/coupon.phtml
index a3be465..12399ee 100644
--- a/app/design/frontend/base/default/template/checkout/cart/coupon.phtml
+++ b/app/design/frontend/base/default/template/checkout/cart/coupon.phtml
@@ -26,27 +26,8 @@
?>
isPossibleOnepageCheckout()):?>
- isDisabled()):?> disabled="disabled" onclick="window.location='getCheckoutUrl() ?>'; setLayerData('CartPage', 'Cart Page', 'Proceed To Checkout', 'Proceed To Checkout'); onCheckoutOption(1, 'Proceed To Checkout');">__('Proceed to Checkout') ?>
+ isDisabled()):?> disabled="disabled" onclick="window.location='getCheckoutUrl() ?>'; setLayerData('CartPage', 'Cart Page', 'Proceed To Checkout', 'Proceed To Checkout'); onCheckoutOption(1, 'Proceed To Checkout');">__('Proceed to Checkout') ?>
-
diff --git a/app/design/frontend/base/default/template/sales/order/history.phtml b/app/design/frontend/base/default/template/sales/order/history.phtml
index 0d3f921..da28770 100755
--- a/app/design/frontend/base/default/template/sales/order/history.phtml
+++ b/app/design/frontend/base/default/template/sales/order/history.phtml
@@ -61,7 +61,7 @@
getStatusLabel() ?>
__('View Order') ?>
- | __('Track Order') ?>
+ |__('Track Order') ?> */ ?>
helper('sales/reorder')->canReorder($_order)) : ?>
| __('Reorder') ?>
@@ -79,7 +79,7 @@
getStatusLabel() ?>
__('View Order') ?>
- | __('Track Order') ?>
+ |__('Track Order') ?> */ ?>
helper('sales/reorder')->canReorder($_order)) : ?>
| __('Reorder') ?>
diff --git a/app/design/frontend/base/default/template/sales/order/recent.phtml b/app/design/frontend/base/default/template/sales/order/recent.phtml
index 4134ed2..015f43b 100755
--- a/app/design/frontend/base/default/template/sales/order/recent.phtml
+++ b/app/design/frontend/base/default/template/sales/order/recent.phtml
@@ -61,7 +61,6 @@
__('View Order') ?>
- | __('Track Order') ?>
helper('sales/reorder')->canReorder($_order)) : ?>
| __('Reorder') ?>
@@ -80,7 +79,6 @@
__('View Order') ?>
- | __('Track Order') ?>
helper('sales/reorder')->canReorder($_order)) : ?>
| __('Reorder') ?>
diff --git a/app/design/frontend/smartwave/default/template/smartwave/megamenu/html/mobilemenu.phtml b/app/design/frontend/smartwave/default/template/smartwave/megamenu/html/mobilemenu.phtml
index c2b2b72..21d3b66 100644
--- a/app/design/frontend/smartwave/default/template/smartwave/megamenu/html/mobilemenu.phtml
+++ b/app/design/frontend/smartwave/default/template/smartwave/megamenu/html/mobilemenu.phtml
@@ -1,4 +1,5 @@
@@ -10,4 +11,4 @@
*/
-?>
+?>
\ No newline at end of file
diff --git a/app/design/frontend/smartwave/default/template/smartwave/megamenu/html/topmenu.phtml b/app/design/frontend/smartwave/default/template/smartwave/megamenu/html/topmenu.phtml
index 2e4f37f..059b467 100644
--- a/app/design/frontend/smartwave/default/template/smartwave/megamenu/html/topmenu.phtml
+++ b/app/design/frontend/smartwave/default/template/smartwave/megamenu/html/topmenu.phtml
@@ -1,4 +1,5 @@
diff --git a/app/design/frontend/smartwave/porto/layout/trackorder.xml b/app/design/frontend/smartwave/porto/layout/trackorder.xml
index 34d51f5..06b61f9 100644
--- a/app/design/frontend/smartwave/porto/layout/trackorder.xml
+++ b/app/design/frontend/smartwave/porto/layout/trackorder.xml
@@ -6,20 +6,32 @@
+
+ trackorder/css/trackorder.css
+
+
page/1column.phtml
Track Your Order
+
-
-
- page/1column.phtml
-
+
+
+
+ page/1column.phtml
+
+
+
+
diff --git a/app/design/frontend/smartwave/porto/template/catalog/product/list/toolbar.phtml b/app/design/frontend/smartwave/porto/template/catalog/product/list/toolbar.phtml
index b64caf4..b3643f4 100644
--- a/app/design/frontend/smartwave/porto/template/catalog/product/list/toolbar.phtml
+++ b/app/design/frontend/smartwave/porto/template/catalog/product/list/toolbar.phtml
@@ -39,7 +39,7 @@
getPagerHtml() ?>
- getTotalNum().''. $this->__(' Items | Show') ?>:
+ __('Show') ?>:
getAvailableLimit() as $_key=>$_limit): ?>
isLimitCurrent($_key)): ?> selected="selected">
diff --git a/app/design/frontend/smartwave/porto/template/catalog/product/view.phtml b/app/design/frontend/smartwave/porto/template/catalog/product/view.phtml
index 086081b..79d7f71 100644
--- a/app/design/frontend/smartwave/porto/template/catalog/product/view.phtml
+++ b/app/design/frontend/smartwave/porto/template/catalog/product/view.phtml
@@ -501,24 +501,10 @@
isInStock()): ?>
-
-
-
-
-
-
+
+