Search results for: 'mage'
Results in Category pages.
-
Magento
All premium extension for magento are listed here. You can also find appropriate free magento plugins and magento themes here like schedule order email notfication after place order . Magento CMS & Aw Blog Integrated search , Magento Portfolio , Magento Testimonial , Ultimate slider ,
-
CMS Services
Content management system (CMS) in context of websites is indicate to the system that allows personnel of a company to manage their website content on their own. We at Samdoit offer open source CMS services to fulfill your latest demands and trends of e-business. Our motive is not only to develop, deploy and maintain content of rich websites effectively but also to reduce the cost of website maintenance.
Wordpress
Now a day Wordpress has globally become a well known powerful CMS platform to publish different blogs on a website. Wordpress is an open source Content Management System which helps to update, manage and edit the content of website as well. Wordpress is an excellent CMS and most powerful tool for publishing blog on website. Samdoit offer effective and cost affordable Wordpress Development and customization services for customers. We also provide Wordpress migration service that can help you to convert any HTML, Joomla website into Wordpress website.
Joomla
Joomla is one of the most used Open Source Content Management System (CMS). Joomla helps to build content rich dynamic web portals and website applications. Joomla is the most powerful CMS in internet world. Joomla is a free open source content publishing system for creating highly interactive multi language websites, eCommerce Applications, Real Estate Portals, media portals, online communities, etc...
Drupal
We develop web sites using the Drupal content management system (CMS). Drupal is open-source software with user friendly functionalities such as search, access control, user login, hacker prevention capabilities and more. On top of Drupal, we can install and configure additional modules to add additional functionalities to the website. These can be event calendar, blog, email newsletters, social networking features, etc. The main advantages of Drupal CMS are that lets you check some boxes to turn your website into a full-blown website.
Open source CMS customization
- Ecommerce stores and Auction Website
- Blogs and Forums
- Online Classifieds and job portals
- Document and Event Management Systems
- Multi Language Websites
- Online Shopping cart websites
- Social Networking Websites
-
E-commerce solutions
Samdoit accommodate the E-Commerce solution to their clients needs on various business.. We work for both large as well as small shop to inaugurate
their offline shop via online or to start their new online venture. We work closely with our clients to achieve their need with ease and fast.
Magento E-commerce solutions
Magento is a feature - rich E-Commerce solution that combines the adjustability of open-source technology with industry leading features. Magento offers the complete flexibility and control over the operations, look, content, and functionality of an Online Store. Samdoit offer E-Commerce, Online Store Development using Magento Open Source Platform.
Results in Magefan Blog.
-
How to Set, Retrieve and Unset Session Variables in Magento
Use of session in Magento:
Let’s start this blog with the session definition, ‘It is a way to preserve certain data across subsequent accesses’. This enables you to build more customized applications and increase the appeal of your web site. Now, Let’s see how to set ,unset and retrieve a session in Magento.Generally, Magento session is handled by core Module ‘core/session’. We use “set<session name>” to set a session variable. For more understanding, look on to the following syntax and example.
Mage::getSingleton(‘core/session’)->set<YOUR SESSION NAME>(<VARIABLE NAME>);
Example :
$myValue =’test’;
Mage::getSingleton(‘core/session’)->setMyValue($myValue);In this example, I have declared the variable $myValue as “test”. I am going to set this variable in session. To do so, I have used the default syntax of the Magento in line 2. Now the session variable is set in the magento.Wow, its easy to set the session variable.
Let’s now look, how to get value from the session variable “MyValue”. To retrieve the session variable, we use
get<YOUR SESSION NAME>();
Mage::getSingleton(‘core/session’)->get<YOUR SESSION NAME>();
In our example, we need to get the session value of “MyValue”. For this, let’s use “getMyValue();”. So our code will be as follows,
$getSession =Mage::getSingleton(‘core/session’)->getMyValue();
Next, we will see how to unset the session variable. To unset the session variable, we have the following syntax,
Mage::getSingleton(‘core/session’)->uns<YOUR SESSION NAME>();
Let’s have a simple example to unset the session variable.
Mage::getSingleton(‘core/session’)->unsMyValue();
This code will automatically delete the session of the MyValue.How to Use customer or core session in frontend. Use adminhtml session in the backend.
Core Session :- Mage::getSingleton(‘core/session’)
Customer Session :- Mage::getSingleton(‘customer/session’)
Admin Session :- Mage::getSingleton(‘adminhtml/session’)
Shopping Cart Session :-Mage::getSingleton(‘checkout/session’)->getQuote() -
All Magento URL list
Magento Mage Core, Admin Static Blocks, or Phtml edits are usually includes getting url path such as images, javascript, base url, media and store url. There are different ways to retrieve mentioned URL paths depending on which section you’re editing.
To Retrieve URL path in STATIC BLOCK
To get SKIN URL{{skin url='images/sampleimage.jpg '}}
To get Media URL{{media url='/sampleimage.jpg'}}
To get Store URL{{store url='mypage.html'}}
To get Base URL{{base url='yourstore/mypage.html'}}
TO Retrieve URL path in PHTML
Note: In editing PHTML don’t forget to enclode the following code with PHP tagNot secure Skin URL:
getSkinUrl('images/sampleimage.jpg') ?>
Secure Skin URLgetSkinUrl('images/ sampleimage.gif', array('_secure'=>true)) ?>
Get Current URL$current_url = Mage::helper('core/url')->getCurrentUrl();
Get Home URL$home_url = Mage::helper('core/url')->getHomeUrl();
Get Magento Media UrlMage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
Get Magento Media UrlMage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
Get Magento Skin UrlMage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);
Get Magento Store UrlMage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
Get Magento Js UrlMage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS); -
Difference between getSingleton and getModel in Magento
Hi friends,
Some people ask about the difference betweenMage::getModel() and Mage::getSingleton()
in Magento. Here is the difference between these two:
Mage::getModel('module/model')
will create a new instance of the model object (if such object exists in configuration)
So if we write:Mage::getModel('catalog/product'),
it will create new instance of the object product each time. So,
$p1 = Mage::getModel('catalog/product');
$p2 = Mage::getModel('catalog/product');
Then $p1 is a one instance of product and $p2 is another instance of product.While Mage::getSingleton('catalog/product') will create reference on existing object (if object does not exist then this method will create an instance using ::getModel() and returns reference to it).
So, if
$p1 = Mage::getSingleton('catalog/product');
$p2 = Mage::getSingleton('catalog/product');
Then $p1 and $p2 both refer to the same instance of product as reference $p2.That's all.. Cheers.. :)
-
Get current store Data , id and more in magento
Here is the detail for Get current store id in magento
Magento Get store data.
Mage::app()->getStore();
Magento Store IdMage::app()->getStore()->getStoreId();
Magento Store codeMage::app()->getStore()->getCode();
Magento Website IdMage::app()->getStore()->getWebsiteId();
Magento Store NameMage::app()->getStore()->getName();
Magento Is ActiveMage::app()->getStore()->getIsActive();
Magento Store Home Url.Mage::app()->getStore()->getHomeUrl();
-
How to integrate magento and wordpress
You want to integrate your store to blog.simply follow my simple steps.
Step 1:
Goto magneto store files edit index.php add these lines
if ( strpos($_SERVER['REQUEST_URI'], 'index.php/admin') === FALSE )
{
define('WP_USE_THEMES', false);
require_once('../wp-load.php'); // configure your WordPress location.
}
Step 2:
copy "Your-magento-folder/app/code/core/Mage/Core/functions.php"
to "Your-magento-folder/app/code/local/Mage/Core/functions.php"
If u not have the folder structure create that folder and paste .
Step 3:
find "function __() " this line around 90 to 100 in "Your-magento-folder/app/code/local/Mage/Core/functions.php"
thats look like
"function __(){return Mage::app()->getTranslator()->translate(func_get_args());}"U change it like this"if (!function_exists('__')) {function __(){return Mage::app()->getTranslator()->translate(func_get_args());}}" -
Add wysiwyg editor in magento custom module.
Add wysiwyg editor in magento custom module. is very easy to make it in your magento custom modue use this following method to add wysiwyg editor .
go to the file
{your magento root folder}/Block/Adminhtml/{module name}/Edit/Tab/Form.phpadd following code in top of the file
$fieldset->addField('followupemail_text', 'editor', array('name'=>'followupemail_text','label' => Mage::helper('followupemail')->__('Content'),'title' => Mage::helper('followupemail')->__('Content'),'required' => true,'style' => 'height:24em;','config' => $wysiwygConfig, ));go to the file
{your magento root folder}/Block/Adminhtml/{module name}/Edit.phpadd the following line in this file
protected function _prepareLayout(){// Load Wysiwyg on demand and Prepare layoutif (Mage::getSingleton('cms/wysiwyg_config')->isEnabled() && ($block = $this->getLayout()->getBlock('head'))){$block->setCanLoadTinyMce(true);}parent::_prepareLayout();} -
How to add Login/Logout code on magento
Login/Logout Code in Header
<?phpif(! Mage::getSingleton('customer/session')->isLoggedIn()): ?><a href="<?php echo Mage::helper('customer')->getLoginUrl(); ?>"><?phpecho$this->__('Login') ?></a><?phpelse: ?><a href="<?php echo Mage::helper('customer')->getLogoutUrl(); ?>"><?phpecho$this->__('Logout') ?></a><?phpendif; ?> -
Display magento cart in Menu
If you want to change your shopping cart display like number of item and price ,
i give sample image show ,
<div class="mybag"><a href="<?php echo $this->getUrl('checkout/cart')?>"><span class="mybag-text">Shopping Cart:</span><?php $cartcnt= Mage::helper('checkout/cart')->getItemsCount();?><?php if($cartcnt==0):?><span class="empty-bag"><?php echo '0 items,';?><?php echo $this->helper('checkout')->formatPrice(Mage::getSingleton('checkout/cart')->getQuote()->getGrandTotal()); ?></span><?php else:?><span class="bag-item"><?php echo $cartcnt.' '.'items,';?><?php echo $this->helper('checkout')->formatPrice(Mage::getSingleton('checkout/cart')->getQuote()->getGrandTotal()); ?></span><?php endif; ?></a></span></div> -
Add pagination to a custom entity listing in Magento
You have created a new entity type and want to display it as a paginated list ?
First, integrate the MagePageBlockHtmlPager through your block :
class Your_Module_Block_Entityname_ListextendsMage_Core_Block_Template {
protectedfunction _construct() {
parent::_construct();
// We get our collection through our model
$this->_entities = Mage::getModel('your_module/entityname')
->getCollection()
->setOrder('created_at');
// Instantiate a new Pager block
$pager =newMage_Page_Block_Html_Pager();
// We set our limit (here an integer store in configuration).
// /!\ The limit must be set before the collection
$pager->setLimit((int)Mage::getStoreConfig('your_module/entityname/pagination'))
->setCollection($this->_entities);
// Add our Pager block to our current list block
$this->setChild('pager', $pager);
}
}ou just need now to include the call in your template (phtml) file :
<divclass="your_module_entities">
<?php foreach($this->_entities as $entity):?>
<divclass="entity">
<h2><?php echo $entity->getAttribute1();?></h2>
<p><?php echo $entity->getAttribute2();?></p>
</div>
<?php endforeach;?>
</div>
<?php echo $this->getChildHtml('pager');?>And you should be good to go !
-
Magento multi site
Do you want the multi store magento from Single installation of magento . If you want create multi store magento proceed my following way.
Process: 1
If your store have different type of Category and product then follow the steps. Catalog *then* Manage Categories *then* Add Root Category
Process: 2
Create the new Website System *then* Manage Stores *then* Create Website
fill up all asking.
Name: Name for the domain (“samdoit”)
Code : Identifier for the domain (“samdoit")
Create the new store System *then* Manage Stores *then* Create Store
Fill all fields
Website:) Select “samdoit.com” on dropdown .
Name: ) Use samdoit_com identify of store.
Root Category:) Select Categories from category list by default "Default Category"
Create store view:
System *then* Manage Stores *then* Create Store
View Store: Select “samdoit_com” show in dropdown menu.
Name and Code “samdoit_com”
Make sure all leters in smaller case Status: 'Enabled'
Process: 3
Create Magento another domains. You need to update this following files:
Find this two sample file installed
magento root directory
- index.php.sample
- .htaccess.sample .
Copy the two files and Rename both sample files by below names in your other domain.
- .htaccess
- index.php
Open “index.php”
and change line which start with“$mageFilename”
$mageFilename = ‘{Your magento root}/app/Mage.php’;
Also Change Line start with
$mageRunCode" $mageRunCode = isset ($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : ”;
change ' ' into Your store code
$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : ‘samdoit_com’;
Theme Changes: You must to change skin, media and javascript link . Now set Magento admin Panel by click follow way click " Configuration in System on admin panal " In Configuration tab select {YOUR website/store } from the dropdown Under Configuration tab Click "Web" under Web tab select and change the link for Secure also Unsecured : Skin Link (eg: Media Link (eg: JavaScript Link (eg: Now you done . Now your multiple stores magento is ready to use. We can create you a Magento Theme for your site by just copy the folder and paste the folder into {your magento}/skin/frontend/default/{your theme} " and paste it as your store name and then just go the "system *then* configuration *then* Web *then* Design" and change the select your store name and paste the theme name whatever you have created in magento skin folder.
-
Magento
From time to time everyone finds them selves in a position where they are faced with a development they have never confronted before. Today I was achieve to get all orders for a customer based on the customer email address.. While there are almost certainly several ways to do this, I found a nice query that is quick, and capable.
$orderCollection = Mage::getModel(‘sales/order’)->getCollection(); $orderCollection->addFieldToFilter(‘customer_email’,'email@domain.com’);Happy coding, hope this helps next time you’re working on Magento
-
AW Blog Integrated Search
Magento AW Blog Integrated Search extends your default Magento search to include your Magento CMS pages and AW blog posts content in search results. Blog contents are now listed in search results from integrated AW blog to ensure more keywords and content visibility to user. This extension will reduce the user bounce rate and keep your search more interactive and effective than before. You can add following results in default search in Magento
- Magento CSM pages
- AW Blog post
- Mage Search Tearm Improvement .
Integrating AW blog to Magento is a common way to have blog, more traffic and many more advantages. AW blog extension is well known for an effective blog in Magento community. Magento AW blog Integrated Search is compatible with AW blog extension.
How to Use this Extension
After install extension go to System -> Index Management .
In Index Management check “AW Blog Search Index” click “Reindex Data”Customer can view the search result in front end using default magento search.
-
Magento get data from database
In this tutorial we tell you how to retrive the content from database with the use of table name . here is the core help to fetch the content using select query .
$connection = Mage::getSingleton('core/resource')->getConnection('YOUR_DATABASE_NAME');
//I assuming that you created the model for your table
$result = $connection->fetchAll("SELECT *FROM YOUR_TABLE");///just checking the result
print_r($result);Hope this is helps you .
-
Magento: How to get admin user id, name, username, email, etc?
Here is a quick code to get the admin user’s data (id, name, username, email, password, etc).
By admin user, I mean the users that login through the admin panel and those who have access to the admin panel of Magento. The users can be administrator, or with some specific roles.$user = Mage::getSingleton('admin/session')->getData();
$userId = $user->getUser()->getUserId();
$userEmail = $user->getUser()->getEmail();
$userFirstname = $user->getUser()->getFirstname();
$userLastname = $user->getUser()->getLastname();
$userUsername = $user->getUser()->getUsername();
$userPassword = $user->getUser()->getPassword();
Hope this helps.Thanks.
-
Magento Product Email Notification
Magento Product email Notification to send mail to subscriber to new product created and every time
product save with the price changes . You can alert your subscriber about the your new product or
the product price change . It have the following option to send notification .- Have an enable/disaple notification .
- Generate your own design email template .
- Email from name .
- Email from your email .
It have the feature to send newsletter of product notification manualy .
Feature
- Working with magento newsletter .
- Send mail to every subscriber.
- First time product save after "Mage Product Email Notification" extension installed .
- Every time product price changed increase or decrease .
- Mail sent only a product visibility "Enables" & Product have a stock .
- Manual send Newsletter of product notification .
- Related Product also added to email .
- Manual feach the subscriber log .
- Cron to Send mail .
- limit Daily mail .
- Limit to Daily mail per eamil .
- Limit to Mail Per cron .
- Send Mail by Email Order by Descending .
- Send Mail by Price Order by Descending .
- Send Mail by Product ID Order by Descending .
Newsletter Variable
Newsletter Variable can use in Transactional Emails
- {{var items_html}} get Product detail { Name , Description , Price } .
- {{var items_related}} get 3 Related Product detail { Name , Description , Price } .
-
Magento 2: How to check if module is installed or enabled?
We had a requirement to check if one of our modules is enabled or not as two of our modules were sharing the same attribute code. We wanted to make sure that we don’t try to create an attribute again if the other module already installed or enabled.
We have done this many times in Magento 1 by using the following code snippet -:
Mage::helper('core')->isModuleEnabled('vendor_modulename');So we were wondering there must be a simple way of doing this in Magento 2 as well and yes we were not wrong. It is not a single line of code as we had in Magento 1 but there is nothing in Magento 2 which can be implemented in Magneto 2 ???? You have to add dependency to get access to the functions.
Anyways let’s crack on with the code to find out if the module exists or enabled in Magento 2
<?php class Custom { /** * @var \Magento\Framework\Module\Manager */ protected $_moduleManager; /** * @param \Magento\Framework\Module\Manager $moduleManager */ public function __construct( \Magento\Framework\Module\Manager $moduleManager ) { $this->_moduleManager = $moduleManager; } /** * Returns if module exists or not * * @return bool * @throws \Magento\Framework\Exception\LocalizedException */ public function isModuleEnabled() { return $this->_moduleManager->isEnabled('Scommerce_CatalogUrl'); } }That’s it, Hope this article helped you in some way. Please leave us your comment and let us know what do you think? Thanks.












