Jump to content

 

TVKevin

Member Since 17 May 2012
Offline Last Active Apr 01 2013 06:44 PM
-----

Posts I've Made

In Topic: Trying to create a new addon/block

26 July 2012 - 03:20 PM

Hello everyone...

I'm trying to create a custom search menu in the homepage of a site created by cs cart!
I created a new block on the page (html block) and now I'm trying to understand how this thing works!! :/

As I undestood, I must create the php file in the controllers (controllers/customer/) and a corresponding view in views (skins/basic/customer/views). Are we good so far?

Now, how do I make it work? I say the example above, jarody used this action="index.php?dispatch=activation.info" for his activation.php file. But I don't understand the mode=='info' part... Should I choose from the ones that already exist, or should I create my own??


First off, the file locations are incorrect. Your controller should go into addons/your_addon/controllers/(customer or admin) and your view goes into stores/1/skins/basic/customer/addons/your_addon/views/your_addon/.

As for the mode part, it's really simply. When you issue a dispatch of activation.info, it looks for the activation controller and view. In the controller, the mode is the 2nd portion of the dispatch. In your case, info. For the view, it's looking for view.tpl. If your dispatch was changed to openkite.fly_away then it look for the openkite addon folder. In the controller file it will be looking for mode == 'fly_away' to perform what is contained there and it will display these results on fly_away.tpl. You can add whatever mode you want as long as your controller and your view are setup to handle them.

In Topic: At sale completion-get order details, send to a member database

26 July 2012 - 03:17 PM

You need to utilize a checkout.pre.php file to hook into the process. In there check for $mode == 'complete' and add you functionality inside that if statement. This will fire only when an order is complete but it will execute before the 'Your Order is Placed' page is loaded. This allows you to capture any return data from the membership service and display it on the purchase confirmation page.

Your other option is to utilize a func.php file and hook into the fn_place_order function and modify it there.

In Topic: Adding Info if the Product is Used New or Refurbished

26 July 2012 - 03:14 PM

Create a product feature called 'Product Condition' or similar. Then add variants for New, Used, etc. Make it a global feature and it will be available on every product.

In Topic: Settings for Custom Block

13 July 2012 - 12:52 PM

Bump. This needs to be addressed.

I, too, have created numerous blocks but am unable to find anywhere to define the settings.

In Topic: Thumbnail Transparency

03 July 2012 - 01:09 PM

Are there any additional updates on this?

Using CS-Cart Ultimate 3.01 and this is still broken.