Login or create new account.

By registering on joomprod.com, you will have immediate access to all our free products and to the public side of our support forum.

Enjoy our subscriptions.

Each of our subscriptions allow you to enjoy the private side of the support forum and all the update of our products for a period ranging from 3 months to 1 year.

Payment And immediate download.

After subscribing to one of our subscription, the products are immediately downloadable.

Login

Or Register
Accueil / forum / Public Forum / Main Forum / Obtenir la catégorie d'une annonce

Support Availability Because we must sleep sometimes

Working days: Monday to Friday.
Reply time: Depending on the complexity of your support issue it's usually between a few hours to 48 hours.

Support is only guaranteed to paid subscribers

AdsManager - End of life

It is with great regrets that we have chosen to end the developpement of Adsmanager and its other associated components.

AdsManager is born 10 years ago and, as of today, the number of new subscriptions and downloads have fallen and we cannot maintain the component anymore.

All active subscribers will be able to continue enjoying support until the end of their subscription.

The components will be free and no support will be provided anymore for the other users.

×

Notice

The forum is in read only mode.

× OLD Forum post could be checked here : forum.joomprod.com

Obtenir la catégorie d'une annonce

More
12 years 2 months ago #6755 by BoiteuxM
Obtenir la catégorie d'une annonce was created by BoiteuxM
Bonjour,

J'essaye de récupérer la catégorie d'une annonce.
Pour cela j'utilise le code suivant dans la page php de view/details/template/defaut.php:

$categorieannonce = $this->content->category;
echo ' </br> la categorie de lannonce est '.$categorieannonce;

Le résultat est "0". Lorsque je vais voir dans la table ads dans myphpadmin, les catégories des annonces sont toutes 0.
Est-ce normal ? Ne devrais-je pas voir "catégorie1" ou "catégorie2" ??
Est-ce le numéro du parent qui est affiché ?

Pour info, dans la table catégorie de adsmanager, je retrouve bien mes catégories dans la colonne "name".

Désolé si le topic a déjà été affiché.

Comment pourrais obtenir la catégorie de l'annonce ?
Merci
More
12 years 2 months ago #6756 by tompap
Replied by tompap on topic Obtenir la catégorie d'une annonce
Bonjour,

Une astuce simple: var_dump($this->content); :)

sinon pour la categorie: $this->content->cat et pour la categorie "parent" de la categorie $this->content->parent
More
12 years 2 months ago #6759 by BoiteuxM
Replied by BoiteuxM on topic Obtenir la catégorie d'une annonce
Bonjour,

merci de votre réponse. J'ai bien obtenue la catégorie avec $this->content->cat (et non $this->content->category)
merci pour l'astuce var_dump($this->content) !

Maxime
More
12 years 2 months ago #6770 by tompap
Replied by tompap on topic Obtenir la catégorie d'une annonce
Avec Plaisir :) !
Moderators: perry
Time to create page: 0.048 seconds
Powered by Kunena Forum