Creating an Amazon product module

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
8/3/2008 7:01:29 PM
Gravatar
Total Posts 40

Creating an Amazon product module

Hi all,

I'm working on a module to bring data in from Amazon, Ebay etc. to display in a module which I'll include under HTML content in my webpage. I'm planning to create a simple ascx control which uses eg. the Amazon API to bring back a product relevant to the page the user is on.

Each page will have a different Amazon product displayed, so I need a way of passing an Amazon ASIN from the Mojoportal page at runtime to the module, which will then use the ASIN to find whatever content it needs through the Amazon API. Normally one way I could do this would be to pass parameters directly to the ascx control, however I don't think I can do this in Mojoportal. Does anyone have any idea how I can go about this?

Many thanks in advance,
Matt

8/4/2008 7:02:23 AM
Gravatar
Total Posts 18439

Re: Creating an Amazon product module

I don't know waht an ASIN is, a book number?

Where are you keeping the data for ASIN?

Why not make the control look it up internally inside the module? Or use a module setting to set it on each instance of the module.

Hope it helps,

Joe

8/4/2008 7:08:49 AM
Gravatar
Total Posts 40

Re: Creating an Amazon product module

Hi Joe, sorry yeah an ASIN is a product Id in Amazon. Using the API you can send it an ASIN and it will return information on the product, which the user control can then interpret and output to the screen.

I want to make it as simple as possible, using one user control to generically look up information based on an ASIN it's been passed. The user control/module could then be added to a product page, the editor of the page could enter an ASIN somewhere, which the user control picks up and gets the required information. As each page will have a different product, and therefore ASIN, the user control needs to read this from somewhere on the page, it's this bit that I'm stuck on...

Thanks,
Matt

8/4/2008 7:25:35 AM
Gravatar
Total Posts 18439

Re: Creating an Amazon product module

Hi,

It sounds to me like a module setting is all you need. With a module setting you put an instance of your amazon module on the page and set the asin in module settings. Module settings are instance specific so you can even put multiple amazon modules on a page and set a different asin for each one.

My documantation is rather scant but ther is some here:

http://www.mojoportal.com/modulesettings-adeveloperconvenience.aspx

and

http://www.mojoportal.com/setupandupgradeforcustomfeatures.aspx

The second link only touches on it but there is a folder for FeatureDefinitions where you can put config files that define the settings for your feature at setup time, or you can manually add them from the UI under Administration > Advanced Tools Feature Installation

You can study config files for existing features to get the syntax for the config files. You'll find som in /Setup/applications/mojoportal-core/FeatureDEfinitions folder.

Hope it helps,

Joe

8/4/2008 7:34:19 AM
Gravatar
Total Posts 40

Re: Creating an Amazon product module

That sounds perfect Joe, thanks a lot.

I'm having some medium trust issues at the moment with searching and updating pages (including in older existing sites which I'm quite confused about) but once that's sorted I'll have a go at this.

Thanks again,
Matt

You must sign in to post in the forums. This thread is closed to new posts.