ddShoppingCartPlugin - 1.0.0

This plugin provide the capability to create a shopping cart based website. You can use the another plugin together with this: "[ddOnlineStorePlugin](http://www.symfony-project.org/plugins/ddOnlineStorePlugin "ddOnlineStorePlugin")" to make an ecommerce solution.

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to the Plugins Home

Signin


Forgot your password?
Create an account

Tools

Stats

advanced search
Information Readme Releases Changelog Contribute
Show source

ddShoppingCart plugin

The ddShoppingCartPlugin is a symfony plugin that providethe capability to create a shopping cart based website. You can use the another plugin together with this: "ddOnlineStorePlugin" to make an ecommerce solution.

Dependencies

This plugin doesn't have strict dependencies, but needs the following to work:

Installation

You have two different ways to install this plugin:

  • Via a package

    symfony plugin:install ddShoppingCartPlugin
    
  • Via a Subversion checkout

    svn co http//svn.symfony-project.com/plugins/ddShoppingCartPlugin/trunk plugins/ddShoppingCartPlugin
    

General Setup

  • Activate the plugin in the config/ProjectConfiguration.class.php

    class ProjectConfiguration extends sfProjectConfiguration
    {
      public function setup()
      {
        $this->enablePlugins(array(
          '...',
          'ddOnlineStorePlugin'
        ));
      }
    }
  • Add the following code in the user class apps/[your_app]/lib/myUser.class.php

    /**
     * @return ddShoppingCart
     */
    public function getShoppingCart()
    {
        if (!$this->hasAttribute('shopping_cart'))
        {
            $this->setAttribute('shopping_cart', new ddShoppingCart());
        }
     
        return $this->getAttribute('shopping_cart');
    }
  • Clear you cache

    symfony cc