OpenCart-Hellas 

Η Ελληνική κοινότητα υποστήριξης του Opencart

Θέματα που αφορούν τη γενικότερη λειτουργία του Opencart.
#6256
Καλημέρα,

θα ήθελα να μεταφέρω το Attribute TAB μέσα στο Genaral του entry product του Admin. Εννοώ κάποιος να έχει τα attributes μέσα στην αρχική σελίδα του product. Είναι εφικτό το έχει δοκιμάσει κάποιος?

έκδοση 3.0.3.2
Άβαταρ μέλους
Από Alexandra
#6259
Καλημέρα είναι εφικτό,

Στο admin/view/template/catalog/product_form.twig απλά μετέφερε το HTML container των χαρακτηριστικών
Κώδικας: Επιλογή όλων
<div class="tab-pane" id="tab-attribute">
... περιεχόμενο html των attributes ...
</div>
Πριν το κλείσιμο του tab-general container.
Κώδικας: Επιλογή όλων
<div class="tab-pane active" id="tab-general">
... περιεχόμενο html του general ...
-> εδώ τοποθετείς το container των χαρακτηριστικών <-
</div>
#6261
Καλησπέρα, από που ακριβώς παίρνω απο το <tbody>

{% set attribute_row = 0 %}

και κάτω


Κώδικας: Επιλογή όλων
<div class="tab-pane" id="tab-attribute">
              <div class="table-responsive">
                <table id="attribute" class="table table-striped table-bordered table-hover">
                  <thead>
                    <tr>
                      <td class="text-left">{{ entry_attribute }}</td>
                      <td class="text-left">{{ entry_text }}</td>
                      <td></td>
                    </tr>
                  </thead>
                  <tbody>

                    {% set attribute_row = 0 %}
                    {% for product_attribute in product_attributes %}
                      <tr id="attribute-row{{ attribute_row }}">
                        <td class="text-left" style="width: 40%;"><input type="text" name="product_attribute[{{ attribute_row }}][name]" value="{{ product_attribute.name }}" placeholder="{{ entry_attribute }}" class="form-control"/> <input type="hidden" name="product_attribute[{{ attribute_row }}][attribute_id]" value="{{ product_attribute.attribute_id }}"/></td>
                        <td class="text-left">{% for language in languages %}
                            <div class="input-group"><span class="input-group-addon"><img src="language/{{ language.code }}/{{ language.code }}.png" title="{{ language.name }}"/></span> <textarea name="product_attribute[{{ attribute_row }}][product_attribute_description][{{ language.language_id }}][text]" rows="5" placeholder="{{ entry_text }}" class="form-control">{{ product_attribute.product_attribute_description[language.language_id] ? product_attribute.product_attribute_description[language.language_id].text }}</textarea>
                            </div>
                          {% endfor %}</td>
                        <td class="text-right"><button type="button" onclick="$('#attribute-row{{ attribute_row }}').remove();" data-toggle="tooltip" title="{{ button_remove }}" class="btn btn-danger"><i class="fa fa-minus-circle"></i></button></td>
                      </tr>
                      {% set attribute_row = attribute_row + 1 %}
                    {% endfor %}
                  </tbody>

                  <tfoot>
                    <tr>
                      <td colspan="2"></td>
                      <td class="text-right"><button type="button" onclick="addAttribute();" data-toggle="tooltip" title="{{ button_attribute_add }}" class="btn btn-primary"><i class="fa fa-plus-circle"></i></button></td>
                    </tr>
                  </tfoot>
                </table>
              </div>
            </div>

και το βάζω πρίν το {% endfor %}</div> ?????
Κώδικας: Επιλογή όλων
<div class="col-sm-10">
                        <input type="text" name="product_description[{{ language.language_id }}][tag]" value="{{ product_description[language.language_id] ? product_description[language.language_id].tag }}" placeholder="{{ entry_tag }}" id="input-tag{{ language.language_id }}" class="form-control"/>
                      </div>
                    </div>
                  </div>
                {% endfor %}</div>
            </div>
Άβαταρ μέλους
Από Alexandra
#6262
Αυτό:
Κώδικας: Επιλογή όλων
<div class="tab-pane" id="tab-attribute">
              <div class="table-responsive">
                <table id="attribute" class="table table-striped table-bordered table-hover">
                  <thead>
                    <tr>
                      <td class="text-left">{{ entry_attribute }}</td>
                      <td class="text-left">{{ entry_text }}</td>
                      <td></td>
                    </tr>
                  </thead>
                  <tbody>

                    {% set attribute_row = 0 %}
                    {% for product_attribute in product_attributes %}
                      <tr id="attribute-row{{ attribute_row }}">
                        <td class="text-left" style="width: 40%;"><input type="text" name="product_attribute[{{ attribute_row }}][name]" value="{{ product_attribute.name }}" placeholder="{{ entry_attribute }}" class="form-control"/> <input type="hidden" name="product_attribute[{{ attribute_row }}][attribute_id]" value="{{ product_attribute.attribute_id }}"/></td>
                        <td class="text-left">{% for language in languages %}
                            <div class="input-group"><span class="input-group-addon"><img src="language/{{ language.code }}/{{ language.code }}.png" title="{{ language.name }}"/></span> <textarea name="product_attribute[{{ attribute_row }}][product_attribute_description][{{ language.language_id }}][text]" rows="5" placeholder="{{ entry_text }}" class="form-control">{{ product_attribute.product_attribute_description[language.language_id] ? product_attribute.product_attribute_description[language.language_id].text }}</textarea>
                            </div>
                          {% endfor %}</td>
                        <td class="text-right"><button type="button" onclick="$('#attribute-row{{ attribute_row }}').remove();" data-toggle="tooltip" title="{{ button_remove }}" class="btn btn-danger"><i class="fa fa-minus-circle"></i></button></td>
                      </tr>
                      {% set attribute_row = attribute_row + 1 %}
                    {% endfor %}
                  </tbody>

                  <tfoot>
                    <tr>
                      <td colspan="2"></td>
                      <td class="text-right"><button type="button" onclick="addAttribute();" data-toggle="tooltip" title="{{ button_attribute_add }}" class="btn btn-primary"><i class="fa fa-plus-circle"></i></button></td>
                    </tr>
                  </tfoot>
                </table>
              </div>
            </div>
το αφαιρείς και το τοποθετείς πριν τη γραμμή 92, έτσι
Κώδικας: Επιλογή όλων
                {% endfor %}</div>
          <-- εδώ-->
            </div>
Αν ανοίξεις το αρχείο σε έναν code editor, επιλέγοντας κάποιο tag σου επιλέγει αυτόματα το closing tag και έτσι μπορείς εύκολα να μεταφέρεις τμήματα html και να τα εισάγεις στο σωστό σημείο. Αν δεν έχεις εγκατεστημένο, σου προτείνω τα Visual Studio Code και Atom.

Γεια σας. Χρησιμοποιώ το OC 3039 με το Journal και[…]

Πολύ καλά κάνεις και το λες, εννοείτε ότι χρειάζετ[…]

email μέσω SMTP

Καλημέρα, Το έχω δοκιμάσει και με ssl:////mail.m[…]

Πριν ζητήσετε βοήθεια στο φόρουμ, παρακαλούμε ελέγξτε αν υπάρχει έτοιμη λύση στο OpenCart Extension Marketplace!