Post by thufir » Sun Jan 29, 2012 5:51 am

Hi everyone!

Im working on setting up at webshop for the first time, and to save some time, i have bought the Danish Postalservice shipping extension from opencart.com (Here).

Followed the installation instructions, and the shipping methods included showed up in the admin section. But when i click "install" and then "edit", i just get a blank page. Ive done what i can with my basic PHP knowledge to round up the error causing this issue, but cant seem to locate it, although i have a slight feeling that it might just be something stupid i've overlooked.

I have even tried with a totally fresh installation of Opencart, aswell as prior versions to 1.5, still no luck.

I hope someone have run into the same error, or atleast have a clue whats going wrong and point me in the right direction to a fix.

I have tried contacting the owner of the mod, but he is not responding (afterall i payed 75euro for the mod)

Thank you in advance! :)

Newbie

Posts

Joined
Sun Jan 29, 2012 5:33 am

Post by OpenCart Addons » Sun Jan 29, 2012 11:53 am

Hey,

Check that the template file is located in the correct directory:
admin/view/template/shipping/<extension>.tpl

Canada's Leading Expert In OpenCart Development & Certified OpenCart Development Partner Image


User avatar
Active Member

Posts

Joined
Thu Nov 24, 2011 10:51 am
Location - Canada

Post by thufir » Sun Jan 29, 2012 2:03 pm

Hi :) Thanks for the reply!

They are all there, and all files have the same permissions as the working default ones.

Im not sure i am allowed to post any code here since its an Extension i've bought, but tell me if you need me to supply any information! (the log doesnt show anything either)

EDIT:

I tried adding the lines:

Code: Select all

ini_set('display_errors', 1);
ini_set('log_errors', 1);
error_reporting(E_ALL);
... to my admin/index.php, and now im finally getting an error message when pressing edit:
"Fatal error: Cannot access private property Document::$title in /home/vsftpd/thufir.dk/opencart/admin/controller/shipping/flat2.php on line 8 "

Line 8:

Code: Select all

    $this->document->title = $this->language->get('heading_title');
Not sure if thats any useful?

Newbie

Posts

Joined
Sun Jan 29, 2012 5:33 am

Post by thufir » Sun Jan 29, 2012 4:18 pm

Wow! i cant believe i figured it out myself :)

I changed the line:

Code: Select all

$this->document->title = $this->language->get('heading_title');
with this:

Code: Select all

$this->document->setTitle($this->language->get('heading_title'));

Newbie

Posts

Joined
Sun Jan 29, 2012 5:33 am

Post by OpenCart Addons » Mon Jan 30, 2012 12:12 am

So it's all working now?


Joel.

Canada's Leading Expert In OpenCart Development & Certified OpenCart Development Partner Image


User avatar
Active Member

Posts

Joined
Thu Nov 24, 2011 10:51 am
Location - Canada

Post by thufir » Mon Jan 30, 2012 12:36 am

I thought so yes, but now, when i choose to "enable" the shipping module. on the shipping front page it still says "Disabled" even though i have pressed "enable"

Newbie

Posts

Joined
Sun Jan 29, 2012 5:33 am

Post by OpenCart Addons » Mon Jan 30, 2012 1:47 am

Make sure there is a field called "status" in both the controller and template file.

admin / controller / shipping / ____.php

Code: Select all

if (isset($this->request->post['extension_status'])) {
			$this->data['extension_status'] = $this->request->post['extension_status'];
		} else {
			$this->data['extension_status'] = $this->config->get('extension_status');
		}
admin / view / template / shipping / ____.tpl

Code: Select all

 <tr>
                <td><?php echo $entry_status; ?></td>
                <td><select name="extension_status">
                    <?php if ($extension_status) { ?>
                    <option value="1" selected="selected"><?php echo $text_enabled; ?></option>
                    <option value="0"><?php echo $text_disabled; ?></option>
                    <?php } else { ?>
                    <option value="1"><?php echo $text_enabled; ?></option>
                    <option value="0" selected="selected"><?php echo $text_disabled; ?></option>
                    <?php } ?>
                  </select></td>
              </tr>
Something similar to the above ...


Joel.

Canada's Leading Expert In OpenCart Development & Certified OpenCart Development Partner Image


User avatar
Active Member

Posts

Joined
Thu Nov 24, 2011 10:51 am
Location - Canada
Who is online

Users browsing this forum: No registered users and 2 guests