Customize HTML for product listing on signup page

Discussion in 'aMember Pro v.4' started by LeeH, Nov 16, 2011.

  1. LeeH

    LeeH New Member

    Apr 6, 2005
    I've been able to successfully customize the styles and various templates by creating my own theme, which works really well. However, there are parts I would like to customize that don't have templates available like they did in v3.x.

    For example, on the default signup page, I would like to more control over the HTML that is generated for the listing of products within the form in order to fit my site design better, and would like to show the product groupings better based on the categories they belong to. Right now they are all displayed as if in a single general group.

    I was able to find in the /application/default/models/Product.php file that in the Product class there's a method called "defaultRender" containing part of the product row's HTML:

    sprintf('&nbsp;<b>%s</b> %s<br/><span class="small">%s</small><br /><br />',...
    And I'm sure the code for looping through the products and generating the form is in there somewhere, I just wish there was an easier way to modify this than having to adjust the actual code (which can be a pain when performing updates later on).

    Any better solutions?
  2. gswaim

    gswaim CGI-Central Partner

    Jul 2, 2003
    It is a little different with V4, but once you get used to it, all is well. You create a custom form then provide a link to the form.

    1. Go To Admin CP
    2. Click on Configuration
    3. Click on Forms Editor
    4. Click on "New Signup Form"
    You will then see a form building utility that will allow you to build an unlimited number of signup forms. Drag "bricks" to the left box to build a custom form. Remove bricks by dragging them to the right box. Most bricks are configurable. For example on the "Products" brick you click on configure and define which products will be shown on that form.

    A form can support signing up or buying a product after a signup. By default the login information will not be show to a person that is already logged in. If you are presenting a page to some that must be logged in you could even remove the login bricks from the form.

    Give it a whirl....
  3. alex

    alex aMember Pro Customer Staff Member

    Jan 24, 2004
    Unfortunately, there is not better solution yet without more or less complex programming.
    Rendering of products list happens in Am_Form_Brick_Product class (Am/Form/Brick.php file), so you may customize it for now. We will consider adding a template specially for making this customization possible.

Share This Page