vous devez éditer trois pages (modèle, contrôleur, template), Après avoir ajouté le fichier de téléchargement de l'administrateur dans le produit
Ajouter ce catalogue Dans opencart2 \ \ contrôleur \ produit \ product.php
dans la fonction index() ou après la ligne 159
$download_m = $this->model_catalog_product->download_m($product_id);
if(!empty($download_m)){
$data['download_m'] = $this->url->link('account/download/download', 'download_id=' . $download_m['download_id'], 'SSL');}
Ajouter ce dans opencart2 catalogue \ \ model \ catalog \ product.php
dans cette classe ModelCatalogProduct extends Modèle {
public function download_m($product_id) {
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_to_download WHERE product_id = '" . (int)$product_id . "'");
$sql = "SELECT * FROM " . DB_PREFIX . "product_to_download WHERE product_id = '" . (int)$product_id . "'";
if ($query->num_rows) {
return array(
'product_id' => $query->row['product_id'],
'download_id' => $query->row['download_id']
);
}
}
enfin Ajouter à opencart2 \ catalog \ view \ thème \ default \ template produit \ \ product.tpl
Après < h1> < php echo $ HEADING_TITLE?; ?> Ou ligne 138
<?php if(!empty($download_m)){ ?>
<li><a href="<?php echo $download_m; ?>">download here</a></li>
<?php } ?>
S'il vous plaît aidez-moi ... – Kevin
Bro Télécharger est disponible une fois la commande terminée. Donc, une fois le statut de la commande est terminée, client peut se connecter à leur profil et télécharger la section de téléchargement de formulaire de fichier – Ramesh