Search found 25 matches

Search found 25 matches

Better plugin system: Parent/Child Modules

Better Plugin System: OpenCart could use a way to add content to existing modules, in an MVC-compliant way, without having to rewrite core files to do it. For example, people could create modules adding similar product views or videos to Product pages by registering their modules as children of the ...

Jump to post
  • Mon Jul 19, 2010 11:06 am
  • Replies 0
  • Views 1203
Re: BUG: system/engine/action.php: $args are never set

Daniel: You are wrong, Controller->forward IS BROKEN in 1.4.8b . I have not tested with your prerelease of 1.5. I added the following code to my module controller's 'index' method to test: print_r($this->forward('module/video', array("abc"))); Then I ran with the stock 1.4.8b install, and it output ...

Jump to post
  • Tue Jul 13, 2010 12:24 pm
  • Replies 8
  • Views 2066
Re: BUG: system/engine/action.php: $args are never set

Daniel: I definitely do understand MVC design, and I believe it's a great way to design software. And OpenCart seems to be a well-designed program. (I also understand OOP principals. I have been programming for 16 years.) But I don't see how a buggy Action constructor is related to MVC design or OOP...

Jump to post
  • Tue Jul 13, 2010 7:52 am
  • Replies 8
  • Views 2066
Re: Developing modules that store to the database?

In 1.4.9, I've added an automatic call to check if the module has its own install/uninstall function. If so, then it will be called during the install / uninstall steps instead of having to put it at the edit step Awesome, I'll be using it when it's available. For now I thought of putting the check...

Jump to post
  • Tue Jul 13, 2010 6:28 am
  • Replies 15
  • Views 5942
Re: BUG: system/engine/action.php: $args are never set

what exactly is broken? seems its just not used as it is I was planning on using it in a module I'm coding, which displays videos associated with the currently viewed product. The arg would be the product ID, and it would be called from within my template's product template file. It was when I trie...

Jump to post
  • Tue Jul 13, 2010 6:02 am
  • Replies 8
  • Views 2066
Re: BUG: system/engine/action.php: $args are never set

Jay6390: I did consider that this code will set args if the path can't be resolved... but that hardly seems useful. (Only error pages can take arguments?) It seems far more likely that the code was put inside the for loop by accident. I did test my suggested fix and executed a module with arguments ...

Jump to post
  • Tue Jul 13, 2010 4:18 am
  • Replies 8
  • Views 2066
Re: Developing modules that store to the database?

Thanks Qphoria! I saw Xsecrets using it in his module. Do you know if there's any kind of "install" and "uninstall" action that's run on the module when it's installed, so I can set up the new database table? Or should I provide an "install" button in the admin panel view and do it there? Thanks, Rich

Jump to post
  • Tue Jul 13, 2010 4:15 am
  • Replies 15
  • Views 5942
Re: Require SSL for all connections

cakers911: Don't know, but I think I saw the release notes for the most recent version of OpenCart showing a fix for that. In my opinion, there's really no reason for the admin panel to ever be unencrypted. Everything there should be considered sensitive. (I'm currently running it on a private dev s...

Jump to post
  • Sat Jul 10, 2010 4:12 pm
  • Replies 13
  • Views 2102
Re: Image background should be transparent

Daniel: The best way would be to scale images proportionally and avoid padding them with any background color at all; so a 400x600pixel image scaled to fit in a 150x150 thumbnail box would actually be saved at 100x150. No alpha transparency needed. The template then would need to be smart enough to ...

Jump to post
  • Sat Jul 10, 2010 4:05 pm
  • Replies 4
  • Views 1124
Re: Adding new content to Product pages?

Ok, doing it my way turned out a bit more complicated than I originally thought but I think I got it working. I had to create a new Action() object with my module's path, then include the controller file and call a custom method on it that does its thing and returns the output text — all from within...

Jump to post
  • Sat Jul 10, 2010 1:08 pm
  • Replies 1
  • Views 858
BUG: system/engine/action.php: $args are never set

In system/engine/action.php, I found the following code:     public function __construct($route, $args = array()) {         [...]         foreach ($parts as $part) {              [...]             if (is_dir([...])) {                (dive to the next sub-directory)                 continue;         ...

Jump to post
  • Sat Jul 10, 2010 12:29 pm
  • Replies 8
  • Views 2066
Adding new content to Product pages?

I'm developing a Video module that I'm hoping will let you add videos to product pages. Is there any way to embed a module into a Product page without modifying the Product controller? I'm thinking of trying, in my custom product.tpl template file, of adding something along the lines of: $videoContr...

Jump to post
  • Sat Jul 10, 2010 11:31 am
  • Replies 1
  • Views 858
Re: Developing modules that store to the database?

By the way, I looked through your code and saw how it works. I'm starting to figure out how module controllers function, have a dummy one put together right now. Lots of trial and error. :)

Jump to post
  • Sat Jul 10, 2010 10:49 am
  • Replies 15
  • Views 5942
Re: Developing modules that store to the database?

Thanks!

Do you know where there's any good documentation online for developing for OpenCart? There's really no comments in the code and the documentation at opencart.com doesn't go into any detail beyond the barest basics (MVC, etc).

Rich

Jump to post
  • Sat Jul 10, 2010 10:20 am
  • Replies 15
  • Views 5942
Developing modules that store to the database?

I want to create a module that would add a new table to the database. (The purpose would be to store information about product videos.) I know how to do the SQL coding. Does OpenCart allow modules to do this? Looking through the source I see there's a controller folder for modules (catalog/controlle...

Jump to post
  • Sat Jul 10, 2010 8:12 am
  • Replies 15
  • Views 5942
Re: Shopping cart appears empty when checking out

The problem was that cookies were not being shared between the SSL and non-SSL connections. So products added to your cart in a non-SSL connection would remain in your non-SSL shopping cart, while the SSL-encrypted cart remained empty. I fixed it by requiring SSL for all connections to the store (se...

Jump to post
  • Thu Jul 08, 2010 7:36 am
  • Replies 2
  • Views 953
Custom Image Sizes & No Padding On Images

This is a two-part question. 1) Is it possible to generate custom image sizes for my custom template (preferably without hacking the core OpenCart files, but I can if need be)? and, 2) Is there any way to *not* pad the images into perfect squares? I want to keep my rectangular images rectangular wit...

Jump to post
  • Thu Jul 08, 2010 7:31 am
  • Replies 0
  • Views 477
Digital downloads vs. physical media as option

I know OpenCart can handle digital downloads and physical media, but how about doing both from the same product listing? The general idea is to have an Option menu on the product page where the user can select "Order DVD" or "Download." Upon checkout, if "Download" was selected it'll show or email t...

Jump to post
  • Thu Jul 08, 2010 5:29 am
  • Replies 0
  • Views 383
Re: Image background should be transparent

I think he means he doesn't like the white background to the auto-generated product thumbnail images. (I don't either.) While it's possible to hack this to another color, a better solution would be to resize proportionally without adding any padding to the sides at all. But this would mean changing ...

Jump to post
  • Wed Jul 07, 2010 5:20 pm
  • Replies 4
  • Views 1124
[MOD] Simple modification to allow all-SSL connections

I recently coded up a dead-simple method to allow all-SSL store connections. It would be cool to see this added to the core OpenCart code. The discussion thread on this is: http://forum.opencart.com/viewtopic.php?f=20&t=13436 Basically, you can make all in-store links use "https" simply by using an ...

Jump to post
  • Sat Apr 17, 2010 5:10 am
  • Replies 0
  • Views 848

Search found 25 matches