Well back to creating a new shipping method based on weight based shipping...
Done as Q has instructed in the start of this thread and got an error when trying to use the new one in the store:
Fatal error: Call to undefined method Cart::getPostipaketti() in /home/mikimpor/public_html/opencart/catalog/model/shipping/postipaketti.php on line 26
Checked that and changed the line back to:
$postipaketti = $this->cart->getWeight();
Then again tried and got an error:
Fatal error: Call to a member function format() on a non-object in /home/mikimpor/public_html/opencart/catalog/model/shipping/postipaketti.php on line 45
If someone could point me where the problem is...? (not a coder)
Done as Q has instructed in the start of this thread and got an error when trying to use the new one in the store:
Fatal error: Call to undefined method Cart::getPostipaketti() in /home/mikimpor/public_html/opencart/catalog/model/shipping/postipaketti.php on line 26
Checked that and changed the line back to:
$postipaketti = $this->cart->getWeight();
Then again tried and got an error:
Fatal error: Call to a member function format() on a non-object in /home/mikimpor/public_html/opencart/catalog/model/shipping/postipaketti.php on line 45
If someone could point me where the problem is...? (not a coder)
The Finnish OpenCart Forum
"Real programmers don't document. If it was hard to write, it should be hard to understand."
You are trying to format somewhere but probably didn't load the model firstMiguelito wrote:Well back to creating a new shipping method based on weight based shipping...
Done as Q has instructed in the start of this thread and got an error when trying to use the new one in the store:
Fatal error: Call to undefined method Cart::getPostipaketti() in /home/mikimpor/public_html/opencart/catalog/model/shipping/postipaketti.php on line 26
Checked that and changed the line back to:
$postipaketti = $this->cart->getWeight();
Then again tried and got an error:
Fatal error: Call to a member function format() on a non-object in /home/mikimpor/public_html/opencart/catalog/model/shipping/postipaketti.php on line 45
If someone could point me where the problem is...? (not a coder)
Hi Q! I resolved my case with the help of another shipping method so again "trial-mistake" process was the best
The Finnish OpenCart Forum
"Real programmers don't document. If it was hard to write, it should be hard to understand."
This was some great info and I did what I think is exacty what was suggested, yet I'm having the same problem.Qphoria wrote:Ah ok.. so you are 90% there.
The last step is the database (model) stuff. Since information has its own model file
Clone the
admin/model/catalog/information.php
file to event.php as well. That is your missing link
I cloned the file as suggested yet I'm still unable to access it via the admin screen.
Any other suggestions.
Hi Everyone,
I am a webdesigner based in South Africa, with a basic understanding of php
I am trying to create a payment gateway module for mygate.co.za, for SIM credit card processing. I was wondering which of the current modules would be best to use as a 'template' to create my module?
Any help will be greatly appreciately, thanks in advance
I am a webdesigner based in South Africa, with a basic understanding of php
I am trying to create a payment gateway module for mygate.co.za, for SIM credit card processing. I was wondering which of the current modules would be best to use as a 'template' to create my module?
Any help will be greatly appreciately, thanks in advance
Just been reading through this and considering making a module to list categories on the home page in a similar way to the products listed, i.e. show the category name/image and a link.
It seems odd to have to duplicate and edit seven files just to do this as it is literally a case of pulling a few records from the categories table?!
It seems odd to have to duplicate and edit seven files just to do this as it is literally a case of pulling a few records from the categories table?!
This was done as a mod already here: http://forum.opencart.com/viewtopic.php ... ome#p56071Chris P Duck wrote:Just been reading through this and considering making a module to list categories on the home page in a similar way to the products listed, i.e. show the category name/image and a link.
The major con of MVC is the tedious file structure. That is compounded by having separate catalog and admin trees. But the pros will usually outweigh the cons.It seems odd to have to duplicate and edit seven files just to do this as it is literally a case of pulling a few records from the categories table?!
Thanks for the advice. The module which I downloaded which was specific to Opencart 1.4.4 doesn't seem to work though.
Initially it was having trouble loading $this->load->helper('image'); which should be $this->load->model('tool/image');
Now it's showing a different error:
Fatal error: Call to a member function http() on a non-object
I got this from the Contributions section, http://www.opencart.com/index.php?route ... ion_id=177
I assume these things have been tested since it's explained in terms of just unzipping and replacing files?
Initially it was having trouble loading $this->load->helper('image'); which should be $this->load->model('tool/image');
Now it's showing a different error:
Fatal error: Call to a member function http() on a non-object
I got this from the Contributions section, http://www.opencart.com/index.php?route ... ion_id=177
I assume these things have been tested since it's explained in terms of just unzipping and replacing files?
Well you can't assume "1.4.x" means it works with anything higher than 1.4.0
Those 2 things you mentioned were changes that were made in 1.4.1
See here for information on porting modules from 1.4.0 to 1.4.4
http://forum.opencart.com/viewtopic.php?f=22&t=12474
Those 2 things you mentioned were changes that were made in 1.4.1
See here for information on porting modules from 1.4.0 to 1.4.4
http://forum.opencart.com/viewtopic.php?f=22&t=12474
Hi,
I did this trick with weight.php the shipping module for weight based shipping. I have renamed all weight to weight_insurance (i want one seperate shipping for normal shipping and one for garanteed/insured shipping). Though somehow in Admin Home - Shipping after Install of the module, when I try to Edit, the screen is empty, no error, just empty.
I must have overlooked something, but cannot guess what. Who knows?
Kind regards,
Maarten
I did this trick with weight.php the shipping module for weight based shipping. I have renamed all weight to weight_insurance (i want one seperate shipping for normal shipping and one for garanteed/insured shipping). Though somehow in Admin Home - Shipping after Install of the module, when I try to Edit, the screen is empty, no error, just empty.
I must have overlooked something, but cannot guess what. Who knows?
Kind regards,
Maarten
Well back to creating a new shipping method based on weight based shipping...
Find the 3 php page in admin area for 'weight' (language / model / template)
Change all the weight values from weight to yourshippingname (except the ones used to aquire cart weight)
On the user end (controller) they are Langange and Model (2 files)
Change your text again in language and in model change all the weight values from weight to yourshippingname (except the ones used to aquire cart weight)
Works 100%
WebStudent1
Find the 3 php page in admin area for 'weight' (language / model / template)
Change all the weight values from weight to yourshippingname (except the ones used to aquire cart weight)
On the user end (controller) they are Langange and Model (2 files)
Change your text again in language and in model change all the weight values from weight to yourshippingname (except the ones used to aquire cart weight)
Works 100%
WebStudent1
@webstudent1
Which version you duplicate weight based shipping ?? I'm trying to duplicate that weight based shipping into other weight shipping (different provider)
but the 3 php page that you said found on admin area ( langguage / model / template) inside the model folder, i cannot find weight php ...... but inside controller got one weight.php ......
Which version you duplicate weight based shipping ?? I'm trying to duplicate that weight based shipping into other weight shipping (different provider)
but the 3 php page that you said found on admin area ( langguage / model / template) inside the model folder, i cannot find weight php ...... but inside controller got one weight.php ......
In template file, which line should i change from weight to myshippingname ??
should i change this weight into myshippingname ??
Code: Select all
<td><textarea name="weight_<?php echo $geo_zone['geo_zone_id']; ?>_rate" cols="40" rows="5"><?php echo ${'weight_' . $geo_zone['geo_zone_id'] . '_rate'}; ?></textarea></td>
</tr>
<tr>
<td><?php echo $entry_status; ?></td>
<td><select name="weight_<?php echo $geo_zone['geo_zone_id']; ?>_status">
<?php if (${'weight_' . $geo_zone['geo_zone_id'] . '_status'}) { ?>
Hi Q,
I duplicate a category module and it works very well, but i have a problem:
For ex:
i have two categories: Cat 1 and Cat 2
Cat 1
--- subCat 1
--- subCat 2
Cat 2
--- subCat 1
---subCat 2
when i click subCat 1 or subCat 2 in Cat 2, i got error: the page not found! Although i created successfully in admin page.
Just another question, how do i insert products into Cat 2? Which template do i have to edit?
Hope Q or someone else can help me to solve this problem?
Thanks very much!
I duplicate a category module and it works very well, but i have a problem:
For ex:
i have two categories: Cat 1 and Cat 2
Cat 1
--- subCat 1
--- subCat 2
Cat 2
--- subCat 1
---subCat 2
when i click subCat 1 or subCat 2 in Cat 2, i got error: the page not found! Although i created successfully in admin page.
Just another question, how do i insert products into Cat 2? Which template do i have to edit?
Hope Q or someone else can help me to solve this problem?
Thanks very much!
I'm also trying to create a new instance of the category module to run in header with modified controller code.
I followed the steps shown to create a duplicate module and it installs but when I edit and save the changes it is interfering with the original module, do I also need to change every variable name, and the admin model file?
If I don't need to change the controller is there a simple way to output the category data (just the <ul> data) in the header.tpl such as <?php echo $category; ?> but this just outputs Array? I do have the code in header.php to load modules in the header area.
I followed the steps shown to create a duplicate module and it installs but when I edit and save the changes it is interfering with the original module, do I also need to change every variable name, and the admin model file?
If I don't need to change the controller is there a simple way to output the category data (just the <ul> data) in the header.tpl such as <?php echo $category; ?> but this just outputs Array? I do have the code in header.php to load modules in the header area.
Hi channelcommerce,
According to my solution, i create three new tables (oc_category2, oc_category2_description,oc_category2_to_store). They look like oc_category, oc_category_description,oc_category_to_store. They are the same, just have different name.
copy category.php, category.tpl then rename them to category2. Notice: you must change all variables from category to category2, upload into those paths:
------------------------------------------------------------------------------------------------------------------
admin/controller/catalog/category2.php
FIND: admin/controller/common/header.php
admin/controller/module/category2.php
admin/language/english/catalog/category2.php
FIND: admin/language/english/common/header.php
admin/language/english/module/category2.php
admin/language/vietnamese/catalog/category2.php
FIND: admin/language/vietnamese/common/header.php
admin/language/vietnamese/module/category2.php
admin/model/catalog/category2.php
admin/view/template/catalog/category2_form.tpl
admin/view/template/catalog/category2_list.tpl
FIND: admin/view/template/common/header.tpl
admin/view/template/module/category2.tpl
catalog/controller/module/category2.php
catalog/language/english/module/category2.php
catalog/language/vietnamese/module/category2.php
catalog/model/catalog/category2.php
catalog/view/theme/YOURTEMPLATE/template/module/category2.tpl
--------------------------------------------------------------------------------------------------------------------
It runs quite well!
As you can see in my last post, i got a problem to show Cat2 in front page and how to add products to Cat2 . Anyone can suggest any solution? Thanks very much
According to my solution, i create three new tables (oc_category2, oc_category2_description,oc_category2_to_store). They look like oc_category, oc_category_description,oc_category_to_store. They are the same, just have different name.
copy category.php, category.tpl then rename them to category2. Notice: you must change all variables from category to category2, upload into those paths:
------------------------------------------------------------------------------------------------------------------
admin/controller/catalog/category2.php
FIND: admin/controller/common/header.php
Code: Select all
[b]// Insert into header.php: [/b]
$this->data['text_category2'] = $this->language->get('text_category2');
$this->data['category2'] = HTTPS_SERVER . 'index.php?route=catalog/category2';
admin/language/english/catalog/category2.php
FIND: admin/language/english/common/header.php
Code: Select all
// Insert: $_['text_category2'] = 'Categories 2';
admin/language/vietnamese/catalog/category2.php
FIND: admin/language/vietnamese/common/header.php
Code: Select all
// Insert: $_['text_category2'] = 'Chuyên mục 2';
admin/model/catalog/category2.php
admin/view/template/catalog/category2_form.tpl
admin/view/template/catalog/category2_list.tpl
FIND: admin/view/template/common/header.tpl
Code: Select all
[b]// Insert:[/b] <li><a href="<?php echo $category2; ?>"><?php echo $text_category2; ?></a></li>
catalog/controller/module/category2.php
catalog/language/english/module/category2.php
catalog/language/vietnamese/module/category2.php
catalog/model/catalog/category2.php
catalog/view/theme/YOURTEMPLATE/template/module/category2.tpl
--------------------------------------------------------------------------------------------------------------------
It runs quite well!
As you can see in my last post, i got a problem to show Cat2 in front page and how to add products to Cat2 . Anyone can suggest any solution? Thanks very much
Who is online
Users browsing this forum: No registered users and 27 guests