Trebam pomoć za PHP skriptu

Želio bih ubaciti INPUT text fields za “Ime” i “Email” na stranicu za naručivanje (cart.php):

Select your payment option

<form id="payment-from" action="process_order.php">
<input type="hidden" value="1" name="proceed" id="proceed"/>
<input type="hidden" value="" name="products_list" id="products_list"/>
<input type="hidden" value="" name="products_value" id="products_value"/>

// Ovdje bi išli inputi

E-Mail: $_POST[email]
Ime: $_POST[name]

// Ovo je dio gdje se izabire plaćanje

<?php
$first_option = true;

if(trim($xml_config->configuration->paypal_account)!="")
{
?>
	<input <?php if($first_option) echo "checked";?> type="radio" name="payment_option" value="paypal"/>
	<img src="images/paypal.png" alt="Payment through PayPal.com"/>
<?php
}


?>
<div class="clearfix"></div>

Tako da mi se prikaže u mailu (process-order.php):

//Sending an email with the order details to the notification email
mail
(
	$xml_config->configuration->notification_email,
	"New Order",
	"Ordered items: ".stripslashes($_REQUEST["products_list"])."\n\n".
	"Total value: ".$xml_config->configuration->currency_symbol.$_REQUEST["products_value"]
);
To je iz ove jednostavne karte za naručivanje: http://www.netartmedia.net/easy-cart Molio bih ako netko ima vremena da to sredi. Hvala unaprijed...

u cart.php:

    	<form id="payment-from" action="netart-easy-cart/process_order.php" target="ajax-ifr">
    	<input type="hidden" value="1" name="proceed" id="proceed"/>
    	<input type="hidden" value="" name="products_list" id="products_list"/>
    	<input type="hidden" value="" name="products_value" id="products_value"/>
    	
    	<?php
    	$first_option = true;
    	
    	if(trim($xml_config->configuration->paypal_account)!="")
    	{
    	?>
    		<input <?php if($first_option) echo "checked";?> type="radio" name="payment_option" value="paypal"/>
    		<img src="netart-easy-cart/images/paypal.png" alt="Payment through PayPal.com"/>
    	<?php
    	}
    	
    	
    	?>
    	<div class="clearfix"></div>
// ************************
// ovo je dodatak
// ************************
    	<br/>
    Please enter additional info<br/>
    Enter your name: <input type="text" name="name" value=""><br/>
    Enter your email: <input type="text" name="email" value=""><br/>

// ********************
// kraj dodatka
// ********************
    <br/>
    <br/>
    	<a href="javascript:GoToCart()" class="btn btn-xs btn-default add-right-margin">Go back to cart</a>
    	<a href="javascript:SubmitPaymentForm()" type="button" class="btn btn-xs btn-info">Continue</a>
    	
    	</form>

process_order.php

//Sending an email with the order details to the notification email
mail
(
	$xml_config->configuration->notification_email,
	"New Order",
            "Customer name: ".stripslashes($_REQUEST["name"])."\n\n".
            "Customer email: ".stripslashes($_REQUEST["email"])."\n\n".
	"Ordered items: ".stripslashes($_REQUEST["products_list"])."\n\n".
	"Total value: ".$xml_config->configuration->currency_symbol.$_REQUEST["products_value"]
);
1 Like

Hvala ti, idem isprobati. Radis li po narudzbi? Volio bih da mi netko sredi css za tu kartu, eventualno ako moze i da se ubaci mogucnost linka za download nakon uplate. Javi mi cijenu. Pozz, Ivan

Generalno radim, al trenutno ne jer sam pretrpan poslom. Povremeno doletim ovdje na forum kad odmaram mozak, pa me ovakve sitnije pomoći opuštaju.
Siguran sam kako ima ekipe ovdje koja ima vremena i rado će ti izaći u susret (i da imaju dobre recenzije pod “Dobri i loši trgovci”) :wink:


Copyright © 2020 WM Forum - AboutContact - Sponsored by: Mydataknox & Profit Monkey