Post by soularcangel » Fri Dec 07, 2007 4:15 am

Hi Daniel,
I made a new calculating extension and i called the file "storetotal.php"...

The PHP code of this file is ....

Code: Select all

<?php
class CalculateStoretotal extends Calculate {
	function __construct(&$locator) {
		$this->cart     =& $locator->get('cart');
		$this->config   =& $locator->get('config');
		$this->currency =& $locator->get('currency');
		$this->language =& $locator->get('language');

    	$this->language->load('extension/calculate/storetotal.php');
  	}
	
	function calculate() {
		$storetotal_data = array();
		if ($this->config->get('storetotal_status')) {
      		$storetotal_data[] = array(
	    		'title' => $this->language->get('text_storetotal_title'), 
	    		'text'  => $this->currency->format($this->cart->getStoreTotal()),
	    		'value' => $this->cart->getStoreTotal()
	  		);
		}
		
		return $storetotal_data;
  	}

	function getSortOrder() {
		return $this->config->get('storetotal_sort_order');
	}	
}
?>

Now, when i click on EXTENSIONS -> CALCULATE
in the list it's show "storetotal" but when i click on "+" icon to install it, and a message appears:
"Permission Denied! You do not have permission to access this page, please refer to your system administrator".

Now, when i click on ADMIN -> CONFIGURATION -> USERS -> USER GROUP
in the Access list and in the Modify list it isn't show "calculate_storetotal"...

How can i do to resolve my problem?

P.S.  Storetotal Extension Data:
              Code: storetotal
        Directory: calculate
          Filename: storetotal.php
        Controller: calculate_storetotal

Attachments

???
page.jpg

Newbie

Posts

Joined
Mon Oct 08, 2007 9:31 pm

Post by soularcangel » Wed Dec 12, 2007 7:31 pm

Who help me?!?!??!!?!?  :( :'(

Newbie

Posts

Joined
Mon Oct 08, 2007 9:31 pm

Post by bruce » Mon Jan 14, 2008 4:45 pm

I am guessing that you need to write the various versions of calculate_storetotal.php
ie:
admin\controller\calculate_storetotal.php
admin\language\english\controller\calculate_storetotal.php
admin\template\default\content\calculate_storetotal.tpl

Have a look for some examples in

admin\controller                          code used to install/uninstall/etc each extension.
admin\language\english\controller    files with the same name which provide language support
admin\template\default\content      files used to display what you will see when administering the details for your extension

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm
Who is online

Users browsing this forum: No registered users and 2 guests