Google

NukeCoder


View next topic
View previous topic
Post new topic   Reply to topic
Author Message
koshy




Joined: Jun 19, 2008
Posts: 28

PostPosted: Mon Jun 30, 2008 2:13 pm
Reply with quote

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
 
View user's profile Send private message
gotcha
Site Admin
Site Admin



Joined: Oct 25, 2004
Posts: 921

PostPosted: Mon Jun 30, 2008 3:19 pm
Reply with quote

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.
 
View user's profile Send private message Visit poster's website
koshy




Joined: Jun 19, 2008
Posts: 28

PostPosted: Mon Jun 30, 2008 3:33 pm
Reply with quote

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
 
View user's profile Send private message
koshy




Joined: Jun 19, 2008
Posts: 28

PostPosted: Mon Jun 30, 2008 7:05 pm
Reply with quote

Thanks for the unban lol Razz I responded to you with an e-mail Smile

- Koshy
 
View user's profile Send private message
koshy




Joined: Jun 19, 2008
Posts: 28

PostPosted: Thu Jul 03, 2008 7:19 pm
Reply with quote

Bump >.<
 
View user's profile Send private message
Guardian




Joined: Dec 09, 2006
Posts: 335

PostPosted: Fri Jul 04, 2008 3:30 am
Reply with quote

Did you confirm you are working correctly without your custom code?

_________________
Code Authors Nuke Reviews 
View user's profile Send private message
koshy




Joined: Jun 19, 2008
Posts: 28

PostPosted: Fri Jul 04, 2008 11:50 am
Reply with quote

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
 
View user's profile Send private message
Guardian




Joined: Dec 09, 2006
Posts: 335

PostPosted: Fri Jul 04, 2008 1:54 pm
Reply with quote

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 
View user's profile Send private message
koshy




Joined: Jun 19, 2008
Posts: 28

PostPosted: Fri Jul 04, 2008 2:31 pm
Reply with quote

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
 
View user's profile Send private message
Guardian




Joined: Dec 09, 2006
Posts: 335

PostPosted: Fri Jul 04, 2008 3:20 pm
Reply with quote

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 Smile

_________________
Code Authors Nuke Reviews 
View user's profile Send private message
koshy




Joined: Jun 19, 2008
Posts: 28

PostPosted: Fri Jul 04, 2008 4:06 pm
Reply with quote

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 Smile


Thats why I said : I'm sure he is just busy but I kinda need this big time ^^

Thanks for your help,
- Koshy
 
View user's profile Send private message
gotcha
Site Admin
Site Admin



Joined: Oct 25, 2004
Posts: 921

PostPosted: Sat Jul 05, 2008 11:02 am
Reply with quote

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&amp;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'].'" />';
 
View user's profile Send private message Visit poster's website
koshy




Joined: Jun 19, 2008
Posts: 28

PostPosted: Sat Jul 05, 2008 5:01 pm
Reply with quote

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.
 
View user's profile Send private message
gotcha
Site Admin
Site Admin



Joined: Oct 25, 2004
Posts: 921

PostPosted: Sat Jul 05, 2008 6:59 pm
Reply with quote

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
 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 5 Hours
Forums ©