Welcome Guest, Not a member yet? Register   Sign In
Database & view problem
#3

[eluser]Moddi[/eluser]
Whats wrong in here is that first they didn't include the cargo fee but they added it later on dack4.se/cart - The correct price is marked with red colour and i wanted to fix it so it would be where "Varukorg" is to the right, where it says "Totalt: xxxx kr (and a shopping pic). And i got it to work
Code:
=$scart_tot+$shiping_cost+$shiping_cost_moms+
and it worked, on the /cart site that is but no other place.

Picture of the error code!

Cart.php (View)

Code:
<? require('header.php');?>
[removed][removed]
<div id="centerfoot">
&lt;?if($vdata):?&gt;

    <div id="table-title">
        <div id="search-tabtitle">Varukorg</div>
    </div>
    &lt;?=$vdata?&gt;
        <div id="cart-total">
        Frakt: &lt;?=$shiping_cost+$shiping_cost_moms?&gt; kr<br/>
        <font color="red">Totalsumma: &lt;?=$scart_totaly+$shiping_cost+$shiping_cost_moms?&gt; kr</font><br/>
        
    </div>
    
    <div id="table-title">    
        <div id="search-tabtitle">Betalning & Frakter</div>
    </div>
    <div class="form-content">
      &lt;form id="cart-form" method="post" action="/cart/pay/"&gt;
        <div class="form-block" style="width:250px; height:20px;">
            <h2>Betalning</h2>
        </div>
        <div class="form-block" style="height: 20px;">
                <h2>Välj Monteringsstation</h2>
            </div>
        <div class="form-block" style="width:250px;">
            <label>Betalningss&auml;tt</label><br/>
            <select id="select-payment" name="payment" style="width:150px;">
                &lt;!--<option value="1">Kreditkort</option> --&gt;
                <option value="">V&auml;lj Betalningss&auml;tt</option>
                <option value="1">Bankgiro</option>
                <option value="2">Faktura</option>
                &lt;? if ($price>0){?&gt;
                    <option value="&lt;?=$price?&gt;">Avbetalning &lt;?=$price?&gt; kr</option>
                &lt;?}?&gt;
            </select>
        </div>
        
        <div style="float:left;">
            
            <div class="form-block">
                <label>Stad</label><br/>
                &lt;?=$s_countrys?&gt;
            </div>
            <div class="form-block">
                <label>Verkstad</label><br/>
                &lt;?=$garages?&gt;
            </div>
        </div>
        <div class="form-block" id="workshop-desc" style="width:500px;height: auto !important;">&lt;?=$desc?&gt;</div>
        
        <div class="form-block" style="width:500px; height: 40px;">
            <label>Personummer (10 siffor):</label><br/>
            &lt;input type="text" id="soc_num" name="soc_num" class="text" maxlength="10"/&gt; <span style="color: red;">*</span>
        </div>
                
        
        <div class="form-block" style="width:500px; height: 20px;">
            <a class="subm" id="fillbutton">Forts&auml;tt</a>
        </div>
        <div class="form-block" style="width:250px;">
            <label>F&ouml;rnamn:</label><br/>
            &lt;input type="text" id="pay_fname" name="fname" class="text" value="&lt;?=$udata-&gt;fname?&gt;"/> <span style="color: red;">*</span>
        </div>
        <div class="form-block" style="width:250px;">
            <label>Efternamn:</label><br/>
            &lt;input type="text" id="pay_lname" name="lname" class="text" value="&lt;?=$udata-&gt;lname?&gt;"/> <span style="color: red;">*</span>
        </div>
        <div class="form-block" style="width:250px;">
            <label>E-post:</label><br/>
            &lt;input type="text" id="pay_email" name="email" class="text" value="&lt;?=$udata-&gt;email?&gt;"/> <span style="color: red;">*</span>
        </div>
        <div class="form-block" style="width:250px;">
            <label>Telefon:</label><br/>
            &lt;input type="text" id="pay_phone" name="phone" class="text" value="&lt;?=$udata-&gt;phone?&gt;"/> <span style="color: red;">*</span>
        </div>
        <div class="form-block" style="width:250px;">
            <label>Gata:</label><br/>
            &lt;input type="text" id="pay_street" name="street" class="text" value="&lt;?=$udata-&gt;adress?&gt;"/> <span style="color: red;">*</span>
        </div>
        <div class="form-block" style="width:250px;">
            <label>Postnummer:</label><br/>
            &lt;input type="text" id="pay_zip" name="zip" class="text" value="&lt;?=$udata-&gt;zip?&gt;"/> <span style="color: red;">*</span>
        </div>
        <div class="form-block" style="width:250px;">
            <label>Ort:</label><br/>
            &lt;input type="text" id="pay_city" name="city" class="text" value="&lt;?=$udata-&gt;city?&gt;"/> <span style="color: red;">*</span>
        </div>
        <div class="form-block" style="width:250px;">
            <label>&Aring;rsl&ouml;n:</label><br/>
            &lt;input type="text" id="pay_sall" name="sall" class="text"/&gt;
        </div>
        <div class="form-block" style="width:500px;">
            &lt;input type="checkbox" id="pay_agree" name="agree"/&gt;
            <label id='agree_content'>Jag accepterar <a href="http://www.dack4.se/main/page/3" target="_blank">köpvillkoren</a> samt <a href="http://www.delauppbetalningen.se/kontovillkor.pdf" target="_blank">kontovillkoren</a> för delbetalning.</label>
        </div>
        <div class="form-block" style="width:500px;">
            &lt;input class="bluesubm2" type="submit" value="Betala"/&gt;
        </div>
      &lt;/form&gt;
    </div>

    
    <div id="workshop-foot"></div>
&lt;? else:?&gt;
    Din kundvagn &auml;r tom.
&lt;? endif;?&gt;
</div>

But for the cart controller, i cant really share that info public. but the thing is that its actually working on /cart but not other sites, why?


Messages In This Thread
Database & view problem - by El Forum - 01-02-2010, 02:10 PM
Database & view problem - by El Forum - 01-02-2010, 04:26 PM
Database & view problem - by El Forum - 01-02-2010, 06:02 PM
Database & view problem - by El Forum - 01-02-2010, 07:57 PM
Database & view problem - by El Forum - 01-02-2010, 09:50 PM



Theme © iAndrew 2016 - Forum software by © MyBB