17 Posts
arnaud
8 years ago
7
Topic

Hello,

Thank you for your help.

I created an afterstore field where I get the value of an article. Like :

http://www.seblod.com/community/forums/forms-content-types/interaction-between-fields#post25492

I understand with the id, I can call the database and get the value I want. I start my code by :

$v1 = $fields['parent_id']->value;

But how I call the database to get the value ? Could you explain me just for art_title ? I will try by myself after.

Thank you.

Best,

Arnaud

Get a Book for SEBLOD
17 Posts
arnaud
8 years ago
1
Level 1

I try that but it doesn't work :

$identifiant = $fields['parent_id']->value; 

$query = SELECT title FROM `my_table` where id = '$identifiant'; 

$result = mysql_query($query); 

$destinataire = 'mail@nomdedomaine.fr'; 

$message = 'Merci'; 

mail($destinataire,$result, $message);

Could you help me please ? 

Thank you per advance. 

Best,

Arnaud

59 Posts
kobalt
8 years ago
0
Level 2

Hi arnaud,

Instead of apotrophes try quotes please.

$query = "SELECT title FROM `my_table` where id = $identifiant";

greetings

17 Posts
arnaud
8 years ago
1
Level 1

Thank you for your help but it doesn't work. Any suggestion ?

Best, 

Arnaud

595 Posts
Octopoos - Mehdi
8 years ago
0
Level 2

Hi arnaud,

Can you tell us what you want to implement instead of the technical description?

Regards,
Mehdi

17 Posts
arnaud
8 years ago
0
Level 1

Hello, 

Ideally, I would like to create a button "I book a place" who : 

- Redirect to a paiement page. If the paiement is accepted: 

-- Send a mail to the logged user and creator of the annonce. This mail contain the title of article, the email of each personnes, and a text. 

-- Subtract one place from the field where I put the number of place (It's a simple list) 

- Added the title of article and a button "Cancel" in list. This list is specific for each user.

I have the code pack extension. My knowledge in php are limited.

Thanks.

Regards, 

Arnaud

8 years ago
0
Level 1

Bonjour Arnaud,

ton besoin dépasse la simple utilisation du code pack et sans connaissance du PHP ceci me semble bien compliqué.

Le processus de paiement n'est pas un processus synchrone. La réponse peut intervenir n'importe quand après le paiement, sur une url que tu aura indiqué dans ton premier appel.

Le traitement devra se faire alors dans le script de cette page.

Pour ce qui est des appels vers la base de données, le plus simple est d'utiliser le framework de Joomla

Idem pour l' envoie de mail


Cordialement.

Lionel

17 Posts
arnaud
8 years ago
0
Level 1

Merci pour ton aide. 

Je n'ai pas eu trop de temps à consacrer à mon site ces temps ci mais avec les liens que tu m'as donné et un peu de patience, j'ai enfin réussi à récupérer les valeurs et à envoyer un mail !

MERCI !

Get a VIP membership