Hi there, On my web site I'm planning to sell digital products, therefore I will have a lot of products to sell. When I add a product to the list, the user gets to choose the product from the "Membership Type" list. The "Membership Type" type list is currently a click-able option, is it possible to have the options within a drop-down box? Rather than a long list. I believe it is possible, if so, how would I go about adding this? What part of which template do I need to modify? Kind regards.
If you are selling many one off digital products, I think a shopping cart would be more appropriate than a membership system. David
Hey David, Thanks for your response. I've been searching for a shopping cart system for my web site, however, aMember is the most intergrate-able in terms of looks with my current HTML/PHP web site. Do you think you could recommend me any shopping cart scripts? So far, aMember seems to be the best, unfortunately that's a membership type system. Again, appreciate your response. Kind regards.
Just to clarify, what is "a lot of products" and are they easily grouped into smaller lists of products? If so, aMember may be an ok solution using the price_group filters. That being said, for true shopping cart environments, I've been fairly happy with CS-Cart
Hey skippybosco, In overall I will be selling 24 products, possibly more. These are all eGoods; which can be downloaded onto your computer the same day. They can be categorised in smaller lists of products but they won't be. As each product will be sold as a single stand alone product and not with other products. I'd like to stick with aMember, the only thing I need to know is how to change the "Membership Type" selection from options to a drop down. And if I do go with a shopping cart script, I'd like it so that I can integrate it with my current web site which is coded using HTML and php, aMember can do this easily.
@ hauzer: replace the following code in templates/signup.html (lines 18-20) Code: <input class="required" type="radio" id="product{$p.product_id}" name="product_id" value="{$p.product_id|escape}" {if $p.product_id == $smarty.request.product_id }checked="checked"{/if} /> with this: Code: <select name="product_id" size="1"> <option value="">#_TPL_MEMBER_SELECT#</option> {foreach from=$products_to_renew item=p} <option value="{$p.product_id}" {if $p.product_id == $smarty.request.product_id}selected="selected"{/if}>{$p.title} ({$p.terms}) </option> Also make sure the select multiple products is switched off in aMember control panel. (This snippet of code comes from templates/member.html)
nice code share erwinvdb! @hauzer: 24 is very manageable.. When I read "a lot", I was thinking hundreds of products..
Sorry for the late response everyone. I haven't got round to trying out the code you gave me erwinvdb, but I'm sure it'll work. If it does, then all my problems have been answered. A great thanks, if you want me to add a link back to your web site then I will do so to show my appreciation. Also, sorry for not describing my situation in detail skippybosco, I guess I shouldn't have used the "a lot" term for describing my products, however, thanks for replying. Also, a great thanks to everyone who replied.
Sorry for the bump, however, erwinvdb that code doesn't seem to work. The error I receive: Code: ERROR [256] Smarty error: [in signup.html line 24]: syntax error: mismatched tag {/if}. expected {/foreach} (opened line 20). (Smarty_Compiler.class.php, line 2198) in line 1102 of file /home/skinsbuy/public_html/customer/smarty/Smarty.class.php
Thanks for your reply, however, when I do what erwinvdb provided, thereafter adding your (alexander) code, it gives me another error. I currently have 15 products, each with it's own bullet point (known as 'radio' type input field) instead of a drop-down which I want. After applying the code(s) it gives me 15 different drop-downs: Each with no content in, it just states "** Select Product **" in all drop downs. I've tried to make the bullet points a drop-down myself, unfortunately no success, this is what I did: in templates/signup.html find Code: {foreach from=$products item=p} {if count($products)>1} {if $config.select_multiple_products} <input class="required" type="checkbox" id="product{$p.product_id}" name="product_id[]" value="{$p.product_id|escape}" {if in_array($p.product_id, (array)$smarty.request.product_id)}checked="checked"{/if} /> {else} <input class="required" type="radio" id="product{$p.product_id}" name="product_id" value="{$p.product_id|escape}" {if $p.product_id == $smarty.request.product_id }checked="checked"{/if} /> {/if}{* end if $config.select_multiple_products *} {else} <input type="hidden" id="product{$p.product_id}" name="product_id" value="{$p.product_id}" /> {/if} <label for="product{$p.product_id}"><b>{$p.title}</b> ({$p.terms})<br /> <span class="small">{$p.description}</span></label><br /> {if $p.price <= 0.0 } {assign var="paysys_id_not_required" value="1"} {/if} {/foreach} then I replaced this with: Code: {if $config.member_select_multiple_products} {foreach from=$products_to_renew item=p} <input type="checkbox" id="product{$p.product_id}" name="product_id[]" value="{$p.product_id|escape}" {if in_array($p.product_id, (array)$smarty.request.product_id)}checked="checked"{/if} /> <label for="product{$p.product_id}"><b>{$p.title} ({$p.terms})</b><br /> <span class="small">{$p.description}</span></label><br /><br /> {if $p.price <= 0.0 } {assign var="paysys_id_not_required" value="1"} {/if} {/foreach} {else} <select name="product_id" size="1"> <option value="">#_TPL_MEMBER_SELECT#</option> {foreach from=$products_to_renew item=p} <option value="{$p.product_id}" {if $p.product_id == $smarty.request.product_id}selected="selected"{/if}>{$p.title} ({$p.terms}) </option> {if $p.price <= 0.0 } {assign var="paysys_id_not_required" value="1"} {/if} {/foreach} </select> {/if} {if $paysys_id_not_required } <input type="hidden" name="paysys_id_not_required" value="for javascript" /> {/if} This seemed to work perfectly, however, it just gave me a drop-down with only one selectable option, "** Select Product **" P.S. If this drop-drop option eventually works, I still need to have the "Signup Link Wizard" working intact. So that I can automatically make a user select a product.
Well I cehck code that was provided before and it is incorrect you right. here is what you need to do edit signup.html template and find this: Code: {foreach from=$products item=p}. {if count($products)>1} {if $config.select_multiple_products} <input class="required" type="checkbox" id="product{$p.product_id}" name="product_id[]" value="{$p.product_id|escape}" {if in_array($p.product_id, (array)$smarty.request.product_id)}checked="checked"{/if} /> {else} <input class="required" type="radio" id="product{$p.product_id}" name="product_id" value="{$p.product_id|escape}" {if $p.product_id == $smarty.request.product_id }checked="checked"{/if} /> {/if}{* end if $config.select_multiple_products *} {else} <input type="hidden" id="product{$p.product_id}" name="product_id" value="{$p.product_id}" /> {/if} <label for="product{$p.product_id}"><b>{$p.title}</b> ({$p.terms})<br /> <span class="small">{$p.description}</span></label><br /> {if $p.price <= 0.0 } {assign var="paysys_id_not_required" value="1"} {/if} {/foreach} change that block to: Code: <select name='product_id'> {foreach from=$products item=p}. {if count($products)>1} <option value='{$p.product_id}'> <b>{$p.title}</b> ({$p.terms})</option> {else} <input type="hidden" id="product{$p.product_id}" name="product_id" value="{$p.product_id}" /> {/if} {if $p.price <= 0.0 } {assign var="paysys_id_not_required" value="1"} {/if} {/foreach} </select>
Hey alexander, Thanks for your response, that seems to fix the radio type input fields into drop-downs perfectly, however, there is a problem unfortunately. And, the only problem I was worried about. When I pre-select the product, I want the user to have the product I chose. When I create a link, it just seems to only select the first option. For example, when I give a person this URL: http://www.example.com/signup.php?product_id=15&hide_paysys=paypal_r It is set to choose the product 15 for them automatically, however, using this drop-down, it automatically (no matter what URL I give them) selects the first option on the drop-down for them. I would like this "Setup Link Wizard" to work, if possible. Thanks, if not, then I guess I could still use the radio type buttons, but I rather wish I didn't have to. Thank you so far for all response.
Change this line in my code: Code: <option value='{$p.product_id}'> <b>{$p.title}</b> ({$p.terms})</option> to Code: <option value='{$p.product_id}' {if $smarty.request.product_id==$p.product_id}selected{/if}> <b>{$p.title}</b> ({$p.terms})</option> I just forgot about this.
Sorry for my late response, I couldn't visit the forum any sooner. BUT... I see that Alexander came to save the day