| Author |
Message |
koshy

Joined: Jun 19, 2008
Posts: 28
|
Posted:
Mon Jun 30, 2008 2:13 pm |
|
Basically I have done a couple transactions.
It basically won't show the shopping cart contents..
The first turned out perfectly posting the following information:
| Quote: |
Payment Sent to:
koshnarnek@gmail.com
Shopping Cart Contents
Qty Item Options Price
1 40 Levels
Item # 15 STEAMID: STEAM_0:0:3756958
$10.00 USD
Amount $10.00 USD
Order Description:
Shopping Cart
Item Total:
$10.00 USD
Shipping:
$0.00 USD
Handling:
$0.00 USD
Total Amount:
$10.00 USD
Fee Amount:
-$0.59 USD
Net Amount:
$9.41 USD
|
But the second purchase came out like this:
| Quote: |
Payment Sent to:
koshnarnek@gmail.com
Total Amount:
$25.00 USD
Fee Amount:
-$1.03 USD
Net Amount:
$23.97 USD
Item Amount:
$25.00 USD
Shipping:
$0.00 USD
Handling:
$0.00 USD
|
Thanks,
- Koshy |
| |
|
|
 |
gotcha
Site Admin


Joined: Oct 25, 2004
Posts: 921
|
Posted:
Mon Jun 30, 2008 3:19 pm |
|
I have a feeling it has something to do with your custom bit of code for the steam id. It is hard for me to tell if your code is breaking it or if it is my code that is broken. I would suggest temporarily taking out your custom code and see if you can replicate the problem. Let me know what happens. |
| |
|
|
 |
koshy

Joined: Jun 19, 2008
Posts: 28
|
Posted:
Mon Jun 30, 2008 3:33 pm |
|
| gotcha wrote: |
| I have a feeling it has something to do with your custom bit of code for the steam id. It is hard for me to tell if your code is breaking it or if it is my code that is broken. I would suggest temporarily taking out your custom code and see if you can replicate the problem. Let me know what happens. |
Can I show you the custom code and you let me know if/where i went wrong?
Thanks,
- Koshy |
| |
|
|
 |
koshy

Joined: Jun 19, 2008
Posts: 28
|
Posted:
Mon Jun 30, 2008 7:05 pm |
|
Thanks for the unban lol I responded to you with an e-mail
- Koshy |
| |
|
|
 |
koshy

Joined: Jun 19, 2008
Posts: 28
|
Posted:
Thu Jul 03, 2008 7:19 pm |
|
|
|
 |
Guardian

Joined: Dec 09, 2006
Posts: 335
|
Posted:
Fri Jul 04, 2008 3:30 am |
|
|
|
 |
koshy

Joined: Jun 19, 2008
Posts: 28
|
Posted:
Fri Jul 04, 2008 11:50 am |
|
| Guardian wrote: |
| Did you confirm you are working correctly without your custom code? |
Yes but I'm unsure how to code it in TPL format... PHP is easy enough but no idea for the TPL...
Thanks,
- Koshy |
| |
|
|
 |
Guardian

Joined: Dec 09, 2006
Posts: 335
|
Posted:
Fri Jul 04, 2008 1:54 pm |
|
Normally Smarty templates keep appearance (layout) in the tpl files and the code goes into your normal php files.
If you need some custom coding work you could always PM gotcha. I would offer to take a look but I have a pile of things to do already sorry. |
_________________ Code Authors Nuke Reviews |
|
|
 |
koshy

Joined: Jun 19, 2008
Posts: 28
|
Posted:
Fri Jul 04, 2008 2:31 pm |
|
| Guardian wrote: |
Normally Smarty templates keep appearance (layout) in the tpl files and the code goes into your normal php files.
If you need some custom coding work you could always PM gotcha. I would offer to take a look but I have a pile of things to do already sorry. |
I had PM'd gotcha and e-mailed him, even sending the code along to be changed to TPL... but he hasn't gotten back to me =(
Here is his response when I told him the code and where I put it:
| Quote: |
The reason your changes aren't working anymore is because you aren't supposed to edit any of the files in the templates_c folder.
The files in the templates_c folder are compiled to php from the .tpl files and will be recompiled periodically causing any changes to be lost.
Instead, you should be editing the .tpl files in templates/default/shop which will look mostly like html.
If you need any help with the .tpl files feel free to ask me and you can also look at the smarty manual here:
http://www.smarty.net/manual/en/
|
I basically responded back soon after with:
| Quote: |
Hey,
I do need help with the TPL file I don't understand how you do forms or PHP coding itself from within it... so if you could take what I did to the PHP version files mash it into the tpl file and then do the whole compiling for me... or something to this effect that would be great.
Thanks,
- Koshy
|
Unfortunately almost a week after I still don't have a response =/
I'm sure he is just busy but I kinda need this big time ^^
Thanks,
- Koshy |
| |
|
|
 |
Guardian

Joined: Dec 09, 2006
Posts: 335
|
Posted:
Fri Jul 04, 2008 3:20 pm |
|
Ah, I was wrong then, they need to go nto the tpl files because they are compiled and saved into a different location - that makes sense.
I know gotcha quite well, even though we have never actually met so if he has not got back to you, I know there will be a good reason for that but at the end of the day, paid jobs take priority because they help to pay the bills and I'm sure you can appreciate that as you have installed a revenue producing script on your site.
I'm sure the bad weather he is getting at the moment isn't helping but I'm sure he'll get to you as soon as he can  |
_________________ Code Authors Nuke Reviews |
|
|
 |
koshy

Joined: Jun 19, 2008
Posts: 28
|
Posted:
Fri Jul 04, 2008 4:06 pm |
|
| Guardian wrote: |
Ah, I was wrong then, they need to go nto the tpl files because they are compiled and saved into a different location - that makes sense.
I know gotcha quite well, even though we have never actually met so if he has not got back to you, I know there will be a good reason for that but at the end of the day, paid jobs take priority because they help to pay the bills and I'm sure you can appreciate that as you have installed a revenue producing script on your site.
I'm sure the bad weather he is getting at the moment isn't helping but I'm sure he'll get to you as soon as he can  |
Thats why I said : I'm sure he is just busy but I kinda need this big time ^^
Thanks for your help,
- Koshy |
| |
|
|
 |
gotcha
Site Admin


Joined: Oct 25, 2004
Posts: 921
|
Posted:
Sat Jul 05, 2008 11:02 am |
|
Open templates/shop/cart.tpl and find
| Code: |
<form action="{$root_link}" method="get">
<!-- <input type="hidden" name="name" value="Digital_Shop" />
<input type="hidden" name="act" value="checkout" />
<input type="submit" class="submit" value="Checkout" /> -->
<input type="button" value="Checkout" onclick="window.location='modules.php?name=Digital_Shop&act=checkout'" />
</form>
|
change it to something like this...
| Code: |
<form action="modules.php" method="get">
<input type="hidden" name="name" value="Digital_Shop" />
<input type="hidden" name="act" value="checkout" />
<!-- add custom form info here -->
<input type="submit" class="submit" value="Checkout" />
</form>
|
As you can see, the tpl files are mostly plain 'ol html.
Next, open the tpl_plugins/function.payaplform.php
Say you set the "name" of the field above to "steamID".
You can get the value of steamID by using $_GET['steamID'].
I think you already had this part figured out according to your email, but you just add the hidden form fields to the $form_info variable.
Example...
| Code: |
$form_info .= '<input type="hidden" name="os0" value="'.$_GET['steamID'].'" />';
|
|
| |
|
|
 |
koshy

Joined: Jun 19, 2008
Posts: 28
|
Posted:
Sat Jul 05, 2008 5:01 pm |
|
How do I add actual PHP to the .tpl's though?
Because on the checkout page I post the information from the previous page being the steamid so that they know they put the right one in. |
| |
|
|
 |
gotcha
Site Admin


Joined: Oct 25, 2004
Posts: 921
|
Posted:
Sat Jul 05, 2008 6:59 pm |
|
if you want to add php directly to the tpl files you can do something like this....
| Code: |
{php}
echo "Hello World";
{/php} |
Also note, if you just need to retrieve a get or post variable in a tpl file you can use....
| Code: |
{$smarty.get.variable_name}
{$smarty.post.variable_name}
|
More info about that on this page:
http://www.smarty.net/manual/en/language.variables.smarty.php |
| |
|
|
 |
|
|