Wenn Du das in den Ordner_samples lädst, kann das nicht funktionieren. In diesem Ordner sind nur Beispiele, die nicht vom Shop gelesen werden.
Ich habe es aber dort geändert und es geht damit. Mit der ZIP, wie Du für diese USERMOD geschrieben hast, gehtves bei mir nicht?! Muß man ausser das da hochladen noch was einstellen, damit das auch greift? Interessehalber da es ja erst mal geht
) SORRY, ich habe es NICHT in _samples hochgeladen, sondern nur geschrieben, dass es dort schon den Ordner gab. Also sind nun dort 3 Ordner: 1. _samples und deine Beiden. Es geht einfach so nicht bei mir?
Das ist der Block in der neuen product_reviews_write.html (Version 2.1) HTML: <div class="input rating"> <label>{$txt.label_rating}</label> <input type="radio" name="{$INPUT_RATING_NAME}" value="1" {if $INPUT_RATING_VALUE == 1}checked="checked"{/if} /> <img src="{$tpl_path}img/stars_1.gif" alt="" title="" /> *<br /> <input type="radio" name="{$INPUT_RATING_NAME}" value="2" {if $INPUT_RATING_VALUE == 2}checked="checked"{/if} /> <img src="{$tpl_path}img/stars_2.gif" alt="" title="" /><br /> <input type="radio" name="{$INPUT_RATING_NAME}" value="3" {if $INPUT_RATING_VALUE == 3}checked="checked"{/if} /> <img src="{$tpl_path}img/stars_3.gif" alt="" title="" /><br /> <input type="radio" name="{$INPUT_RATING_NAME}" value="4" {if $INPUT_RATING_VALUE == 4}checked="checked"{/if} /> <img src="{$tpl_path}img/stars_4.gif" alt="" title="" /><br /> <input type="radio" name="{$INPUT_RATING_NAME}" value="5" {if $INPUT_RATING_VALUE == 5}checked="checked"{/if} /> <img src="{$tpl_path}img/stars_5.gif" alt="" title="" /><br /> </div> Wo hast Du da die 5 Sterne Markiert? Oder hast Du die Datei aus der Version 2.0 als product_reviews_write-USERMOD.html hochgeladen? Das könnte zukünftig zu Fehlern führen,
PHP: <input type="radio" name="{$INPUT_RATING_NAME}" value="5" checked="checked" /> <img src="{$tpl_path}img/stars_5.gif" alt="" title="" /><br /> so habe ich es gemacht und das geht. Was mache ich falsch bei Deiner ZIP ??? Richtig hochgeladen und cache geleert, aber es bleibt bei 3 Sternen
Deine beiden Ordner sind im richtigen Verzeichnis. Chache hatte ich im Admin und im Browser geleert schau dir doch mal an die 3 Sterne, da dein Browser ja dann "neu" ist Anmeldung mit : test@timetimer.de (Kennwort: tester1234)
Vielleicht ist beim Download oder Entpacken was schief gegangen... ich poste hier mal den Inhalt der Dateien: name_ProductReviewWriteContentControl.inc.php PHP: <?php class name_ProductReviewsWriteContentControl extends name_ProductReviewsWriteContentControl_parent { public function proceed($p_coo_product, $p_customer_id, $p_languages_id = null) { if($p_languages_id === null) { $p_languages_id = $_SESSION['languages_id']; } $coo_captcha = MainFactory::create_object('Captcha'); $t_error_text = ''; $t_error = false; if (isset($this->v_data_array['GET']['action']) && $this->v_data_array['GET']['action'] == 'process' && $coo_captcha->is_valid($this->v_data_array['POST'], 'GM_REVIEWS_VVCODE')) { if (is_object($p_coo_product) && $p_coo_product->isProduct()) { // We got to the process but it is an illegal product, don't write if(strlen_wrapper($this->v_data_array['POST']['review']) >= REVIEW_TEXT_MIN_LENGTH) { $rating = (int)$this->v_data_array['POST']['rating']; if ($rating > 0 && $rating < 6) { $t_result = xtc_db_query("SELECT customers_firstname FROM " . TABLE_CUSTOMERS . " WHERE customers_id = '" . (int)$p_customer_id . "' "); $t_customer_values_array = xtc_db_fetch_array($t_result); $t_reviews_array = array( 'products_id' => $p_coo_product->data['products_id'], 'customers_id' => (int)$p_customer_id, 'customers_name' => gm_prepare_string($t_customer_values_array['customers_firstname']), 'reviews_rating' => gm_prepare_string($rating), 'date_added' => 'now()' ); $this->wrapped_db_perform(__FUNCTION__, TABLE_REVIEWS, $t_reviews_array); $t_insert_id = xtc_db_insert_id(); $t_reviews_description_array = array( 'reviews_id' => $t_insert_id, 'languages_id' => (int)$p_languages_id, 'reviews_text' => gm_prepare_string($this->v_data_array['POST']['review']) ); $this->wrapped_db_perform(__FUNCTION__, TABLE_REVIEWS_DESCRIPTION, $t_reviews_description_array); } else { die('Invalid rating value'); } } else { $t_error = true; $t_error_text = sprintf(GM_REVIEWS_TOO_SHORT,REVIEW_TEXT_MIN_LENGTH); } } if($t_error != true) { $this->set_redirect_url(xtc_href_link(FILENAME_PRODUCT_REVIEWS, htmlentities_wrapper($this->v_data_array['POST']['get_params']))); } } elseif(isset($this->v_data_array['GET']['action']) && !$coo_captcha->is_valid($this->v_data_array['POST'], 'GM_REVIEWS_VVCODE')) { $t_error_text = GM_REVIEWS_WRONG_CODE; } $customer_info = array(); $customer_info_query = xtc_db_query("SELECT customers_firstname FROM " . TABLE_CUSTOMERS . " WHERE customers_id = '" . (int)$p_customer_id . "'"); if(xtc_db_num_rows($customer_info_query) > 0) { $customer_info = xtc_db_fetch_array($customer_info_query); } $t_captcha_html = $coo_captcha->get_html(); $coo_product_reviews_write_view = MainFactory::create_object('ProductReviewsWriteContentView'); $coo_product_reviews_write_view->set_('coo_product', $p_coo_product); $coo_product_reviews_write_view->set_('customer_info', $customer_info); if(isset($this->v_data_array['POST']['review'])) { $coo_product_reviews_write_view->set_('review_message', $this->v_data_array['POST']['review']); } if(isset($this->v_data_array['POST']['rating'])) { $coo_product_reviews_write_view->set_('rating', $this->v_data_array['POST']['rating']); } $coo_product_reviews_write_view->set_('captcha_html', $t_captcha_html); $coo_product_reviews_write_view->set_('error_text', $t_error_text); $this->v_output_buffer = $coo_product_reviews_write_view->get_html(); return true; }} name_ProductReviewsWriteContentView.inc.php PHP: <?php class name_ProductReviewsWriteContentView extends name_ProductReviewsWriteContentView_parent { protected $rating = 5; protected function add_data() { $this->content_array['PRODUCTS_NAME'] = $this->coo_product->data['products_name']; $this->content_array['AUTHOR'] = $this->customer_info['customers_firstname']; $this->content_array['INPUT_TEXT'] = xtc_draw_textarea_field('review', 'soft', 45, 10, htmlentities_wrapper($this->review_message, true), '', false); $this->content_array['TEXTAREA_NAME'] = 'review'; $this->content_array['TEXTAREA_VALUE'] = htmlentities_wrapper($this->review_message, true); $this->content_array['INPUT_RATING'] = xtc_draw_radio_field('rating', '1').' '.xtc_draw_radio_field('rating', '2').' '.xtc_draw_radio_field('rating', '3').' '.xtc_draw_radio_field('rating', '4').' '.xtc_draw_radio_field('rating', '5', true); $this->content_array['INPUT_RATING_NAME'] = 'rating'; $this->content_array['INPUT_RATING_VALUE'] = $this->rating; $this->content_array['GM_VALIDATION_ACTIVE'] = gm_get_conf('GM_REVIEWS_VVCODE'); $this->content_array['GM_VALIDATION'] = GM_REVIEWS_VALIDATION; $this->content_array['GM_CAPTCHA'] = $this->captcha_html; $this->content_array['GM_ERROR'] = $this->error_text; $this->content_array['FORM_ACTION'] = xtc_draw_form('product_reviews_write', xtc_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, 'action=process&'.xtc_product_link($this->coo_product->data['products_id'],$this->coo_product->data['products_name']), 'NONSSL', true, true, true), 'post', ''); $this->content_array['FORM_ID'] = 'product_reviews_write'; $this->content_array['FORM_ACTION_URL'] = xtc_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, 'action=process&' . xtc_product_link($this->coo_product->data['products_id'], $this->coo_product->data['products_name']), 'NONSSL', true, true, true); $this->content_array['FORM_METHOD'] = 'post'; $this->content_array['BUTTON_BACK'] = '<a href="javascript:history.back(1)">'.xtc_image_button('button_back.gif', IMAGE_BUTTON_BACK).'</a>'; $this->content_array['BUTTON_BACK_LINK'] = 'javascript:history.back(1)'; // lets retrieve all $HTTP_GET_VARS keys and values.. $t_get_params = xtc_get_all_get_params(); $t_get_params = substr_wrapper($t_get_params, 0, -5); //remove trailing & $this->content_array['BUTTON_SUBMIT'] = xtc_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE).xtc_draw_hidden_field('get_params', $t_get_params); $this->content_array['FORM_END'] = '</form>'; $this->content_array['GM_PRIVACY_LINK'] = gm_get_privacy_link('GM_CHECK_PRIVACY_REVIEWS'); }}?>
Okay, danke, ich probiere das am Montag aus. UND: es ist NICHTS anderes einzustellen, also NUR die beiden Dateien in das entsprechende Verzeichnis ?
Guten Morgen Barbara, vielen lieben Dank ;-) Jetzt geht's War wohl wie Du geschrieben hast, in Zip oä. Fehler. VG Olaf In Deinem Script der 1. Datei fehlt noch das abschließende PHP: ?>
Hallo Zusammen, bei mir werden nur 6 Rezensionen angezeigt und die anderen lässt der Shop einfach weg. Im Adminbereich aber sehe ich diese. Hat jemand eine Idee wo ich das einstellen kann, so dass man alle sehen kann? Vielen Dank
Hallo patmar, was hast du denn eingestellt, wie viele Rezensionen angezeigt werden sollen? Konfiguration->Maximumwerte
Hallo zusammen ich wollte auch gerne nur den ersten Buchstaben vom nachnamen anzeigen lassen. Aber in der Shopversion 2.1.4 sind die Dateien nicht mehr so, dass der code angepasst werden kann. Folgendes hatte ich mir aufgeschrieben: In der product_reviews_write.php auskommentieren Code: $smarty->assign('AUTHOR', $customer_info['customers_firstname'].' '.$customer_info['customers_lastname'][0].'.'); in der product_reviews.php folgenden code einfügen Code: $smarty->assign('language', $_SESSION['language']); // xtmodding change: Splits customer name and shortens surname preg_match('/[^ ]*$/', $reviews['customers_name'], $results); $customers_lastname = $results[0]; $customers_firstname = explode(" ", $reviews['customers_name']); // add ucfirst to make sure that capital letters are shown $customers_name = ucfirst($customers_firstname[0]).' '.ucfirst($customers_lastname[0]).'.'; // xtmodding change end Und zwar ca. ab Zeile 153 nach Code: $smarty->assign('BUTTON_WRITE', '<a href="'.xtc_href_link(FILENAME_PRODUCT_REVIEWS_WRI TE, $get_params).'">'.xtc_image_button('button_write_r eview.gif', IMAGE_BUTTON_WRITE_REVIEW).'</a>'); nichts davon kann ich finden :/
Schau mal bitte in das Verzeichnis: system/ classes/ reviews/ Da solltest Du die passenden Dateien finden. Das geht jetzt Updatesicher
Und schon ist wieder eine neue Shopversion da und ich frage mich gerade, wie ich das in 2.4.1 einbauen/umsetzen kann Danke vorab für die Hilfe! UPDATE: Dank Barbaras Beitrag vom 5.03.2015 hab ich das für v2.4.1.0 locker hingekriegt.
Die stehen automatisch unter dem Artikel in der Artikeldetailansicht, sobald eine Kundenrezension abgegeben wurde. Aber nur in der jeweiligen Sprache!