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

[eluser]Moddi[/eluser]
Hi.

I got problem with the Database and View file.
My website wasn't made by me and i paid a company to fix it and they used CodeIgniter so i need to learn it. My php/mysql knowledge is poor but im a fast learner. Now to the problem

Site: http://dack4.se

When i change something on the /view files, like adding variables or adding picture/flash stuff it doesn't show up correctly when u press at any link on the left except 'Hem'. and if u hover ur mouse over 'Om oss' u will see that the link for it is http://www.dack4.se/main/page/2 , Whats happening is that on any other url except /main/page is working correctly, on those pages it either show a white image or gives me php error codes saying Variables not found (something like that).

With phpmyadmin i can see that there is a table called 'mas_page' and then i can see all those pages.

On any other pages except those thats made in the database is working perfectly.

So what im a supposed to do? all answers will be appreciated!
#2

[eluser]LuckyFella73[/eluser]
Hej Moddi,

first of all please post the controller and the view code
where the error messages appear and what changes you made
to the code. I'm sure somebody will be able to help you
or at least give you a good starting point!

Gott nytt år Wink
#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?
#4

[eluser]2think[/eluser]
Moddi

There are a few possible answers for why things are happening (errors, etc.) and why the static pages are displaying correctly.

Unless someone familiar with Codeigniter goes through your site - which often entails a cost/fee for the person's time - then it would be very hard for it to be debugged remotely with so many variables.

What you may want to consider is getting a good tutorial book on Codeigniter - if you want to learn it - or any other preferred language and since you said you're a fast learner, going through that.

One of the areas you may need to look for is the use of a template solution or header files, etc

Sorry to sound negative, that isn't my intention but especially when you can't share certain parts of the site, it is a challenge for others to help. (Not saying you absolutely need to share but if you knew PHP/Codeigniter well enough, it is likely you could obscure/hide the important areas.)
#5

[eluser]Moddi[/eluser]
well ye but i mean there got to be some way? missing variables? gotta be a file i need to write the shit down :p




Theme © iAndrew 2016 - Forum software by © MyBB