Wednesday

Cake PHP vs Zend Framework

The Zend Framework, developed by Zend Technologies is an open-source, object oriented web-application framework implemented in PHP 5. It is widely known as ZF and is developed with the purpose of making things easier for PHP developers and supporting best practices at the same time. CakePHP too, is an open-source web application framework used for creating web applications written in PHP. It is developed by Cake Software Foundation, Inc. It is written in PHP and is based on the model of Ruby on Rails.

Zend Framework has easy methods of licensing with the new BSD license and a swift and well-tested code base that your business can rely upon. It makes use of commonly available APIs from well known vendors like Google, Amazon, Yahoo!, Flickr and API providers and catalogers such as StrikeIron and Programmable Web.

ZF offers a simple component library to provide 80 percent of the functionality mostly needed by developers. The rest of the 20 percent can be altered as per your requirements of the business. This can be done since it has a flexible architecture and you do not need any configuration file to get started with. Due to this, training costs are lessened and the product reaches the market sooner. Moreover, Zend Framework also offers:

  • AJAX support through JSON, which offers ease-of-use of the framework.
  • The PHP version of the Lucene Search engine.
  • Simple access to data formats needed in Web 2.0 applications.
  • The ideal destination to utilize and publish web services.
  • Top quality, object-oriented PHP 5 class library.

CakePHP is a rapid development framework for PHP that offers a flexible architecture for development, maintenance and deployment of applications. It uses the usual design patterns like MVC and ORM within the convention over configuration paradigm that helps lower development expenses and does not need the developers to write a lot of code. CakePHP boasts of clients like Mozilla Addons, Scratch by MIT, Yale Daily News, Onion Store and MapMe to name a few.

Just like ZF, CakePHP does not require configuration. It is very simple to use. The company has a user friendly community called #cakephp on IRC that helps new users to begin. It is distributed under the MIT License and promises Best Practices like security, authentication and session handling. It has an object-oriented approach to keep you at ease.

Overall, both these frameworks are good to use as per your requirements. CakePHP is suitable for developers new to MVC and those who require stricter conventions. ZF is a choice for those who need better control over the application design and built-in support for renowned Web services. Both the frameworks are developing fast and the choice is entirely yours.

curtsy: Douglas Brown

The Zend Framework, developed by Zend Technologies is an open-source, object oriented web-application framework implemented in PHP 5. It is widely known as ZF and is developed with the purpose of making things easier for PHP developers and supporting best practices at the same time. CakePHP too, is an open-source web application framework used for creating web applications written in PHP. It is developed by Cake Software Foundation, Inc. It is written in PHP and is based on the model of Ruby on Rails.

Zend Framework has easy methods of licensing with the new BSD license and a swift and well-tested code base that your business can rely upon. It makes use of commonly available APIs from well known vendors like Google, Amazon, Yahoo!, Flickr and API providers and catalogers such as StrikeIron and Programmable Web.

ZF offers a simple component library to provide 80 percent of the functionality mostly needed by developers. The rest of the 20 percent can be altered as per your requirements of the business. This can be done since it has a flexible architecture and you do not need any configuration file to get started with. Due to this, training costs are lessened and the product reaches the market sooner. Moreover, Zend Framework also offers:

  • AJAX support through JSON, which offers ease-of-use of the framework.
  • The PHP version of the Lucene Search engine.
  • Simple access to data formats needed in Web 2.0 applications.
  • The ideal destination to utilize and publish web services.
  • Top quality, object-oriented PHP 5 class library.

CakePHP is a rapid development framework for PHP that offers a flexible architecture for development, maintenance and deployment of applications. It uses the usual design patterns like MVC and ORM within the convention over configuration paradigm that helps lower development expenses and does not need the developers to write a lot of code. CakePHP boasts of clients like Mozilla Addons, Scratch by MIT, Yale Daily News, Onion Store and MapMe to name a few.

Just like ZF, CakePHP does not require configuration. It is very simple to use. The company has a user friendly community called #cakephp on IRC that helps new users to begin. It is distributed under the MIT License and promises Best Practices like security, authentication and session handling. It has an object-oriented approach to keep you at ease.

Overall, both these frameworks are good to use as per your requirements. CakePHP is suitable for developers new to MVC and those who require stricter conventions. ZF is a choice for those who need better control over the application design and built-in support for renowned Web services. Both the frameworks are developing fast and the choice is entirely yours.

curtsy: Douglas Brown

Thursday

Indian becoming Cloud service leader

India has potential to emerge as the global competency centre for cloud services, says Microsoft.

India, with its powerful ecosystem of over 1300 independent software vendors (ISVs), 1.4 million developers and more than 11000 system integrators (SIs and custom software development organizations), is ideal to tap this growing opportunity.

As a result, an additional 300,000 jobs related to cloud services are estimated to be created in India over the next 5 years. A study by global consultants, Zinnov estimates the global cloud computing market to be over $70 billion by 2015.

Steve Ballmer, CEO, Microsoft Corporation said, "India will not only see a surge in consumption of cloud services, driving growth in domestic IT usage, but companies all over the world will look to India to support their transition to cloud computing."

Microsoft's cloud infrastructure supports over one billion customers and 20 million businesses globally. Leaders from the industry and academia also support Microsoft cloud services.

NIIT will train over 100,000 students on Windows Azure over the next three years

Rajendra Pawar, Chairman, NIIT said, "We foresee the power of the cloud and the following gap in the skill set. Through our exclusive program, our attempt is to offset this gap by churning out first-day first-hour trained professionals on Windows Azure".

Academic institutions such as the IITs and IIITs are also building large India-relevant projects leveraging Microsoft's Azure platform.

Cognizant has announced the creation of a vertically aligned set of industry frameworks and pre-built solution accelerators to enable implementation, migration and management of cloud-enabled application portfolios built on Azure for clients both in India and globally.

"Windows Azure helps customers unlock the value that can be derived from cloud-enabled services, and helps them build strong and agile businesses," said Chandrasekaran, president and MD (global delivery), Cognizant.

CDC Software has announced the global roll out of its flagship product 'CDC Respond' (a complaint and feedback management application for banking and government sectors) on Windows Azure.

The Indian Institute of Science, Bangalore, is building a large-scale application on Windows Azure to study the basic resource allocation constructs and strategies required for addressing enterprise needs on cloud computing.

These announcements are in addition to the over 4000 applications that have already been built on the Windows Azure platform by India.

ISVs and SIs including Wipro , Infosys, TCS, HCL Technologies and Mahindra Satyam are building applications and solutions across verticals ranging from healthcare to banking to manufacturing for both local and global markets.

courtsy: rediff.com

Wednesday

IP addresses and its future

It has emerged that the IP addresses used in helping to distinguish one computer from another are expected to run out in approximately 500 days.

The unique numbers, which are known as Internet protocol addresses, help identify the world's networked devices.

An IP address uses four numbers from 0 to 255 to distinguish one computer from another. As an example, computers around the world can recognise the IP address 203.26.51.71 as a server for fairfax.com.au, which publishes this newspaper online.

There are more than four billion combinations. But the proliferation of networked devices means soon that will no longer be enough.

In a way, IP addresses are like phone numbers, which need to be entered correctly if a right connection is to be made. So the ability to uniquely identify everything in the computer world is essential.

IP addresses are like phone numbers in another way, too.

Just as Australia [ Images ] had to move from seven-digit phone numbers to eight digits in the early 1990s, massive change will now be required globally to resolve the problem.

However, there's a complication.

"Unlike the telephone system, it's not easy to just add more digits," the Sydney [ Images ] Morning Herald quoted chief scientist at the Asia Pacific Network Information Centre, Geoff Huston, as saying.

Although every telephone number in Australia was successfully altered, the phones themselves didn't change. Humans simply dialled an extra number and were connected to the person.

But every web server, every iPhone, every router and everything else - possibly billions of devices - will need to be reconfigured or upgraded.

"The idea that every last one has to go back into the doctor for a new transplant does sound a bit frightening. It's almost like having to teach every device a new language," Huston said.

Fortunately, a new language exists.

Computers now use IP version 4 and have since the 1980s. Its replacement is version 6, known as IPv6. For humans, little will change.

The traditional way we visit a website, by typing google.com or facebook.com, won't be any different and personal computers will automatically use IPv4 or IPv6 as required.

The impending shortage has been apparent for more than a decade as the volume of networked devices has escalated but inertia has stymied efforts to prepare for IPv6, Huston revealed.

While personal computers have been capable of understanding IPv6 since Windows XP and Apple OS X, Huston says only about 5 percent of devices are configured to do so. Among web servers, the figure is less than 1 per cent.

Internode is one of the few Internet service providers that offers an IPv6 service. Telstra is among the many that do not. Tens of millions of mobile phones are on an IPv4 network only.

Technically, it's not all that difficult to enable IPv6. Logistically, it's a horrendous challenge, and the conversion can involve substantial costs, with little in return.

"It doesn't make your Internet any shinier or any brighter, so customers won't pay more," he said.

Consequently, Huston predicts we will get to a point where large numbers of people will no longer be able to see everything on the Internet.

So far, the dwindling storehouse of IP addresses has been managed with trickery that translates one IP address to another.

But by about late September next year, the key body that distributes IP addresses will run out of them. Three months after that, every drop in the pipeline will dry up and the only way to get an IPv4 address will be to buy one from someone else.

Lacking that, consumers whose computers are not configured to use IPv6 won't see new websites. Likewise, iPhones, which don't understand IPv6, will be limited to the "old" Internet.

For businesses that are not prepared, this could spell trouble. Unless web servers and mobile phone services are configured to send information via IPv4 as well as IPv6, companies could be left with a fraction of their current customers.

The good news is that once IPv6 is in place, it should satisfy demand as far as a computer can calculate.

"If every single address was one grain of sand, in IPv6 you could build 300 million planets the size of Earth," he added.
Source: ANI

Magento - how to add new attributes

To add customiged fields for shop customer..

First We can make a module to extend the functionality of the customer module already in magento. First adding the module xml file to the app/etc/modules/ directory. You need to decide on a module name. In this example we will use the Sarvottom scope, and call the module 'NewCustomer'. Therefore we need to create a file named Sarvottom_NewCustomer.xml and add the following content:
<code>
<config>
<modules>
<Sarvottom_NewCustomer>
<active>true</active>
<codePool>local</codePool>
</Sarvottom_NewCustomer>
</modules>
</config>
</code>

Second to add the above file means that Magento is now aware of a new custom module been added as local module. Now, we need to create the module itself, which must be located in the app/code/local/Sarvottom/NewCustomer directory. Inside this directory, create an etc directory and copying the following file inside:

app/code/core/Mage/NewCustomer/etc/config.xml

Edit the file and change :
<code>
<modules>
<Mage_NewCustomer>
<version>x.x.x</version>
</Mage_NewCustomer>
</modules>

to:

<modules>
<Sarvottom_NewCustomer>
<version>1.0.0</version>
</Sarvottom_NewCustomer>
</modules>
</code>
Third this file default contains two different <fieldsets> - one in <config><admin> and one in <config><global>. At the end of the second one, in the <config><global><fieldsets><customer_account> scope, add:
<code>
<account_no><create>1</create><update>1</update></account_no>
</code>
In this example account_no is the chosen attribute code. The attribute code that you choose here will be important in all the following steps.
Next we need to add the attribute to the NewCustomer Entity Setup Model. To do this, copy the getDefaultEntities method from app/code/core/Mage/Customer/Model/Entity/Setup.php file to a new file, Model/Entity/Setup.php in our module. Put the method inside the following class:

class Sarvottom_NewCustomer_Model_Entity_Setup extends Mage_Customer_Model_Entity_Setup

Then add the following code at the end of the attributes array inside the customer arrray:

'account_no' => array(
'label' => 'Account No',
'visible' => true,
'required' => true,
),

In this case the new attribute is set as compulsory by adding 'required' => true, to the end of that array. If you want the attribute to be optional, remove the required lines.
Next new attribute needs to be added to the Magento database. The best way to do this is to tell Magento to insert it for you. You can either create your own script that uses the Magento code or you can just drop the following code into one of your template files:

$setup = new Mage_Eav_Model_Entity_Setup('core_setup');
$setup->addAttribute('customer', 'account_no', array(
'label' => 'Account No',
'type' => 'varchar',
'input' => 'text',
'visible' => true,
'required' => true,
'position' => 1,
));

A brilliant way to add the above code is the <theme>/template/customer/form/register.phtml file since it needs to be edited to add a custom field for the new attribute. Make sure the above code is enclosed with
<code>
<?php
...
?>
</code>
To add the attribute (ie. run this code) view the register new customer page. Once you have viewed the page this code can be removed.

In this example the attribute type is set to varchar and the input is set to text. This needs to be modified to match the requirements of each specific attribute.
Next point, the attribute is installed and it will show up in the backend. We need to modify the frontend, so that the customers can enter values for the custom attribute. There are two fairly similar phtml files:
<code>
<theme>/template/customer/widget/name.phtml
</code>
Now you need to add a new text box in the name.phtml file, since that is what customers see on the register page. Make sure that the ID and name of the new input text box match the attribute code chosen in step 3. In this case it is 'account_no'. The following shows the sample code that adds a new text box with a label:
<code>
<div class="input-box">
<label for="account_no"><?php echo $this->__('Account No') ?><span class="required">*</span></label><br />
<input type="text" name="account_no" id="account_no" value="<?php echo $this->htmlEscape($this->getFormData()->getAccount_No()) ?>" title="<?php echo $this->__('Account No') ?>" class="required-entry input-text" />
</div>
</code>

Friday

Bypass Magento Payment and Shipping

Magento has always been flying forward with code optimization and adding new features. Recently I’ve been tasked with upgrading one of our websites from 1.2 to 1.3.2
Seems like alot has changed since that time, no core changes are now required, you can overwrite code functionality with your own controllers, and etc.. Awesome! So lets move forward.

How would you disable shipping and payment steps for you Magento installation and apply changes in such manner that you wont have to worry about this when doing the next Magento upgrade?
Below is a step by step tutorial “copy paste” pretty much.

Now I don’t expect this that this solution will always work with next version of Magento, but unless they deprecate some existing functionality I’m sure you wont need to change anything.
NOTE: When doing copy paste make sure you wont end up with weird characters, such as single and double quotes.

STEP 1

First step would be to get a Magento extension called “LKC_ModularRouters” (ext. key: “magento-community/LKC_ModularRouters” to be used in MagentoConnect from admin tool)
After installation you can proceed to step 2, if you are using Magento v.1.3 if you are on a newer version you would need to make some tweaks to that module, since it has not been updated for the newer versions yet.
See how to do it…

STEP 2

Next, you would want to do is to create a project folder under /app/code/local
Lets say we name it “XYZ”

STEP 3

First, lets create a Bock that will overwrite existing Magento core block for onepage checkout /app/code/local/XYZ/Checkout/Block/Onepage.php

  1. class XYZ_Checkout_Block_Onepage extends Mage_Checkout_Block_Onepage {
  2. public function getSteps() {
  3. $steps = array();
  4. if (!$this->isCustomerLoggedIn()) {
  5. $steps['login'] = $this->getCheckout()->getStepData('login');
  6. }
  7. $stepCodes = array('billing', 'shipping', 'review');
  8. foreach ($stepCodes as $step) {
  9. $steps[$step] = $this->getCheckout()->getStepData($step);
  10. }
  11. return $steps;
  12. }
  13. }

Basically, this class will extend the core class. If you compare getSteps() function to the core file its pretty much identical, we just removed payment and shipping option steps.

STEP 4

Now this is the most intense part, We would have to tweak the default controllers for that page and make sure we assign a shipping method automatically and automatically select free shipping.

Create the following file /app/code/local/XYZ/Checkout/Controller/Onepage.php

  1. require_once 'Mage/Checkout/controllers/OnepageController.php';
  2. class XYZ_Checkout_Controller_Onepage extends Mage_Checkout_OnepageController
  3. {
  4. /**
  5. * Checkout page
  6. */
  7. public function indexAction()
  8. {
  9. if (!Mage::helper('checkout')->canOnepageCheckout()) {
  10. Mage::getSingleton('checkout/session')->addError($this->__('Sorry, Onepage Checkout is disabled.'));
  11. $this->_redirect('checkout/cart');
  12. return;
  13. }
  14. $quote = $this->getOnepage()->getQuote();
  15. if (!$quote->hasItems() || $quote->getHasError()) {
  16. $this->_redirect('checkout/cart');
  17. return;
  18. }
  19. if (!$quote->validateMinimumAmount()) {
  20. $error = Mage::getStoreConfig('sales/minimum_order/error_message');
  21. Mage::getSingleton('checkout/session')->addError($error);
  22. $this->_redirect('checkout/cart');
  23. return;
  24. }
  25. Mage::getSingleton('checkout/session')->setCartWasUpdated(false);
  26. Mage::getSingleton('customer/session')->setBeforeAuthUrl($this->getRequest()->getRequestUri());
  27. $this->getOnepage()->initCheckout();
  28. $this->loadLayout();
  29. $this->_initLayoutMessages('customer/session');
  30. $this->getLayout()->getBlock('head')->setTitle($this->__('Request a Quote'));
  31. $this->renderLayout();
  32. }
  33. public function saveBillingAction()
  34. {
  35. $this->_expireAjax();
  36. if ($this->getRequest()->isPost()) {
  37. $data = $this->getRequest()->getPost('billing', array());
  38. $customerAddressId = $this->getRequest()->getPost('billing_address_id', false);
  39. $result = $this->getOnepage()->saveBilling($data, $customerAddressId);
  40. if (!isset($result['error'])) {
  41. if ($this->getOnepage()->getQuote()->isVirtual()) {
  42. $this->loadLayout('checkout_onepage_review');
  43. $result['goto_section'] = 'review';
  44. $result['update_section'] = array(
  45. 'name' => 'review',
  46. 'html' => $this->getLayout()->getBlock('root')->toHtml()
  47. );
  48. }
  49. elseif (isset($data['use_for_shipping']) && $data['use_for_shipping'] == 1) {
  50. $this->saveShippingMethodAction();
  51. $this->loadLayout('checkout_onepage_review');
  52. $result['goto_section'] = 'review';
  53. $result['update_section'] = array(
  54. 'name' => 'review',
  55. 'html' => $this->_getReviewHtml()
  56. );
  57. $result['allow_sections'] = array('shipping','review');
  58. $result['duplicateBillingInfo'] = 'true';
  59. }
  60. else {
  61. $result['goto_section'] = 'shipping';
  62. }
  63. }
  64. $this->getResponse()->setBody(Zend_Json::encode($result));
  65. }
  66. }
  67. public function saveShippingAction()
  68. {
  69. $this->_expireAjax();
  70. if ($this->getRequest()->isPost()) {
  71. $data = $this->getRequest()->getPost('shipping', array());
  72. $customerAddressId = $this->getRequest()->getPost('shipping_address_id', false);
  73. $result = $this->getOnepage()->saveShipping($data, $customerAddressId);
  74. if (!isset($result['error'])) {
  75. $this->saveShippingMethodAction();
  76. $this->loadLayout('checkout_onepage_review');
  77. $result['goto_section'] = 'review';
  78. $result['update_section'] = array(
  79. 'name' => 'review',
  80. 'html' => $this->_getReviewHtml()
  81. );
  82. }
  83. $this->getResponse()->setBody(Zend_Json::encode($result));
  84. }
  85. }
  86. public function saveShippingMethodAction()
  87. {
  88. $this->_expireAjax();
  89. if ($this->getRequest()->isPost()) {
  90. $this->savePaymentAction();
  91. $data = $this->getRequest()->getPost('shipping_method', 'freeshipping_freeshipping');
  92. $result = $this->getOnepage()->saveShippingMethod($data);
  93. $this->getResponse()->setBody(Zend_Json::encode($result));
  94. }
  95. }
  96. public function savePaymentAction()
  97. {
  98. $this->_expireAjax();
  99. if ($this->getRequest()->isPost()) {
  100. $data = $this->getRequest()->getPost('payment', array('method'=>'checkmo'));
  101. try {
  102. $result = $this->getOnepage()->savePayment($data);
  103. }
  104. catch (Mage_Payment_Exception $e) {
  105. if ($e->getFields()) {
  106. $result['fields'] = $e->getFields();
  107. }
  108. $result['error'] = $e->getMessage();
  109. }
  110. catch (Exception $e) {
  111. $result['error'] = $e->getMessage();
  112. }
  113. $redirectUrl = $this->getOnePage()->getQuote()->getPayment()->getCheckoutRedirectUrl();
  114. if ($redirectUrl) {
  115. $result['redirect'] = $redirectUrl;
  116. }
  117. $this->getResponse()->setBody(Zend_Json::encode($result));
  118. }
  119. }
  120. }

STEP 5

Now that the code is in place we need to rewrite the core calls to custom classes we’ve created. To do so you create the file /app/code/local/XYZ/Checkout/etc/config.xml

  1. xml version="1.0"?>
  2. <config>
  3. <modules>
  4. <XYZ_Checkout>
  5. <version>0.1.0version>
  6. XYZ_Checkout>
  7. modules>
  8. <global>
  9. <controllers>
  10. <Mage_Checkout>
  11. <rewrite>
  12. <onepage>XYZ_Checkout_Controller_Onepageonepage>
  13. rewrite>
  14. Mage_Checkout>
  15. controllers>
  16. <blocks>
  17. <checkout>
  18. <rewrite>
  19. <onepage>XYZ_Checkout_Block_Onepageonepage>
  20. rewrite>
  21. checkout>
  22. blocks>
  23. global>
  24. config>

STEP 6

Now we would have to add a new XML config file for you XYZ module. This config file will tell Magento about your module and here you will enable all the code you wrote. /app/etc/modules/XYZ_All.xml

  1. xml version="1.0"?>
  2. <config>
  3. <modules>
  4. <XYZ_Checkout>
  5. <active>trueactive>
  6. <codePool>localcodePool>
  7. <<b style="color: white; background-color: rgb(136, 0, 0);">dependsb>>
  8. <Mage_Core />
  9. <Mage_Checkout />
  10. <LKC_ModularRouters />
  11. <b style="color: white; background-color: rgb(136, 0, 0);">dependsb>>
  12. XYZ_Checkout>
  13. modules>
  14. config>

STEP 7

Now that the tough part is done, we will just need to do some little tweaks to the AJAX JS file and tweak Magento configuration in the admin tool.
Now locate and open /skin/frontend/default/YOURSKIN/js/opcheckout.js where YOURSKIN is the skin you are using for your site. In most cases its ‘default’ but if you are using a separate skin that you might have created then it will be in a folder you’ve created.

Approximately on the line 721 you should find “var Review = Class.create();” which defines the Review class. Now if you skip to ’save’ function for that class you will find this line of code “var params = Form.serialize(payment.form);” We will have to tweak this because we are skipping payment. This variable wont be defined if we place the order. So I have changed that line to :

  1. //var params = Form.serialize(payment.form);
  2. var params = "color: black; background-color: rgb(255, 153, 153);">payment%5Bmethod%5D=checkmo";
  3. if (this.agreementsForm) {
  4. params += '&'+Form.serialize(this.agreementsForm);
  5. }
  6. params.save = true;

As you see we commented out the serialize call and hardcoding the parameter to reflect the free payment method

STEP 8

Now the last part: tweaking Magento configuration

  1. Go to the admin tool and go to System->Configuration->Shipping Methods and make sure “Free Shipping” is Enabled.
  2. Go to the admin tool and go to System->Configuration->Payment Methods and make sure “Check / Money order” payment option is Enabled.
  3. IMPORTANT! – When copying XML data make sure you don’t have any white-spaces before the first tag, which should be

That is it! Your comments and suggestions are welcome!

courtsy:Blog of Igor Krasnykh

Tuesday

Wholesale Customer Solution with Magento Commerce

The client want to have a shop where regular customers to be able to see products with their retail price, while Wholesale partners to see the prices with ? discount. The extra condition: retail and wholesale prices hasn’t mathematical dependency. So, a product could be $100 for retail and $50 for whole sale and another one could be $60 retail and $50 wholesale. And of course retail users should not be able to see wholesale prices at all.

Basically, I will explain what I did step-by-step, but in order to understand what I mean, you should be familiar with the basics of Magento.

1. Creating two magento websites, stores and views
(Magento meaning of website of course) It’s done from from System->Manage Stores. The result is:
Website | Store | View
————————————————
Retail->Retail->Default
Wholesale->Wholesale->Default

Both sites using the same category/product tree

2. Setting the price scope
in System->Configuration->Catalog->Catalog->Price set drop-down to Website. Now you could enter prices per store/website and they could be totally different.

3. Get some plugins
Get following plugins from Magento Connect and install them from admin: System->Magento Connect->Magento Connect Manager:
Netzarbeiter_LoginCatalog – User need to login in order to see the store (it will be used for Wholesale site)
Netzarbeiter_CustomerActivation – User need to be approved from site admins in order to be able to login to the site. (again it will be used for wholesale site)

Both plugins need to be activated for wholesale only. Because they are activated when they are installed, you need to disable them for Default/Retail website and to leave enabled to Wholesale. You should know that distinction between sites in System->Configuration is done from top left corner of the config window.

First plugin is enabled/disabled from: System > Configuration > Catalog > Login only catalog
Second one: System > Configuration > Customer > Customer Activation.

4. Setting separate url for Wholesale
Now wholesales need to have separate urls, so regular users will access http://domain.com/, while wholesale will access http://domain.com/wholesale/. I found this solution in the Magento Forum: Thread.

So, following the instructions I created directory wholesale/ and copied .htaccess and index.php files from the root directory. Modifications in the index.php are the same as in the Forum:
Mage::run(); become Mage::run(’wholesale’);
and
$mageFilename = ‘app/Mage.php’; become $mageFilename = ‘../app/Mage.php’;

5. Change the wholesale paths from the admin
From System->Configuration (select Wholesale website)->General->Web and change the paths by adding wholesale/ (it’s also mentioned in the forum thread).

6. Adding products to both websites
When adding products, you should mark them visible for both sites. This is done from Product page->Websites tab.

That’s it! Now on http://domain.com/ users will see full catalog, they can login without Admin approval and prices will be retail, while on http://domain.com/wholesale only users registered as wholesale and activated from admin will be able to see catalog with wholesale prices.

courtsy: http://nik.chankov.ne

Beyond Spot-Checking: Why LLM Applications Require Specialized Evaluation

  images generated by meta ai Building applications with Large Language Models (LLMs) feels deceptively fast at first. A single engineer can...