Note on Features: Some features documented here require an addon, refer to the Feature List for details.

Note about 'Listings': The use of the term "listings" in the user manual can refer to classifieds, classified ads, standard auctions, dutch auctions, reverse auctions, and buy now only.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

startup_tutorial_and_checklist:design_configuration:design_tools:system_template_changes:common_template_changes:force_questions_public [2018/07/05 18:49] (current)
geojames created
Line 1: Line 1:
 +====== Force All Contact Seller Question To Be Public ======
 +
 +<tip c>**As this change involves a system template it does not exist in your custom template set by default.  It must be copied from the default template set to your custom template set before changes can be made to it.  The [[startup_tutorial_and_checklist:design_configuration:design_tools:system_template_changes:start|system template edit support wiki page explains the steps of getting that to your custom template set]]**</tip>
 +
 +As noted in the support wiki page that explains the public questions feature you can force all questions to be public through modifications within system templates attached to this feature.  You will make your customizations within the following system templates:
 +
 +Depending on the contact seller template you use you could use either of these:
 +  /(your custom template set)/system/listing_details/contact_seller_form.tpl
 +  /(your custom template set)/system/browsing/contact_forms/seller_form.tpl
 +  
 +The above templates are what displays when the potential buyer clicks the contact seller button or clicks on the contact seller tab within the listing details page.    
 +  
 +If you use the feature that displays the former template above you'll see code like this:  
 +<code>
 + {if $canAskPublicQuestion}
 + <div class="{cycle values='row_even,row_odd'}">
 + <label for="c_public_question{$listing_id}" class="field_label">{$messages.500890}</label>
 + <select name="c[public_question]" class="field" id="c_public_question{$listing_id}">
 + <option value="0">{$messages.500891}</option>
 + <option value="1">{$messages.500892}</option>
 + </select>
 + </div>
 + {/if}
 +</code>  
 +
 +If you form you use makes use of the latter template above you'll see this:
 +<code>
 + {if $canAskPublicQuestion}
 + <div class="{cycle values="row_even,row_odd"}">
 + <label for="c_public_question" class="field_label">{$labels.public_question}</label>
 + <select name="c[public_question]" class="field">
 + <option value="0">{$labels.public_question_no}</option>
 + <option value="1">{$labels.public_question_yes}</option>
 + </select>
 + </div>
 + {/if}
 +</code>
 +
 +While the above are a bit different the "c[public_question]" submitted through the form is still the same variable.  To force the buyer's response to be public you would replace the contents of the div above with a hidden form value that looks like:
 +
 +<code>
 +        <input type="hidden" name="c[public_question]" value="1">
 +</code>
 +
 +You could choose to remove the <div> also but that's your choice.  The above just needs to be within the <form>...</form> tags of that template to make sure that value is submitted properly.
 +
 +The above forces the buyer's response to "yes".  To complete this you must also force the seller's response to "yes" within their form.  To do that look to make more changes in the following system template:
 +
 +  /(your custom template set)/system/user_management/communications/view_communication.tpl
 +  
 +Within that template you'll see something like the following: 
 +
 +<code>
 + {if $isPublicQuestion}
 + <input class="field" type="checkbox" style="height: 15px;" name="d[public_answer]" value="1" /> <span style="font-size: 0.8em;">{$messages.500893}</span><br /><br />
 + {/if}
 +</code>
 +
 +You will need to replace "input" tag in the above with a hidden input tag like:
 +
 +<code>
 +       <input type="hidden" name="d[public_answer]" value="1">
 +</code>
 +
 +
 +
  
/home/geodesic/apps/dokuwiki/data/pages/startup_tutorial_and_checklist/design_configuration/design_tools/system_template_changes/common_template_changes/force_questions_public.txt · Last modified: 2018/07/05 18:49 by geojames
CC Attribution-Noncommercial-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0