22.01.2021 13:31
|
|
admotionlachen
Name: Pascal
23.08.2018
Posts: 118
|
Labels
i have made several labels that can be selected manually. However, I can only deposit these as an image. Is it possible to display the title instead of an image? Then I can style them all exactly the same.
Joomla: 3.9.24 JoomShopping: 4.18.4 Website Url: https://www.trampolinecenter.ch/de/ersatzteile/fangnetz-ersatzteile
|
|
22.01.2021 13:57
|
|
admin
(Support Team)
Name: Admin
05.08.2010
Posts: 25934
|
Aw: Labels
Not upload image for label.
|
|
25.01.2021 15:15
|
|
admotionlachen
Name: Pascal
23.08.2018
Posts: 118
|
Aw: Labels
Thanks for the answer, now I know again why I worked with pictures in the first place. The colors must be different, is that possible? that I can assign a separate class per label, for example?
|
|
26.01.2021 08:16
|
|
admin
(Support Team)
Name: Admin
05.08.2010
Posts: 25934
|
Aw: Labels
change template
1. components\com_jshopping\templates\default\list_products\product.php
<?php if ($product->label_id){?>
<div class="product_label">
<?php if ($product->_label_image){?>
<img src="<?php print $product->_label_image?>" alt="<?php print htmlspecialchars($product->_label_name)?>" />
<?php }else{?>
<span class="label_name lid<?php print $product->label_id?>"><?php print $product->_label_name;?></span>
<?php }?>
</div>
<?php }?>
2. components\com_jshopping\templates\default\product\product_default.php
...
Last change: 26.01.2021 08:16
|
|
28.01.2021 08:02
|
|
admotionlachen
Name: Pascal
23.08.2018
Posts: 118
|
Aw: Labels
Perfect, thank you!
Colette
|
|
29.01.2021 11:26
|
|
admotionlachen
Name: Pascal
23.08.2018
Posts: 118
|
Aw: Labels
i have to ask again, which file do i have to adapt so that the labels can also be controlled in the details per class?
|
|
29.01.2021 15:17
|
|
admin
(Support Team)
Name: Admin
05.08.2010
Posts: 25934
|
Aw: Labels
components\com_jshopping\templates\default\product\product_default.php
or I didn't understand you .
|
|
29.01.2021 16:04
|
|
admotionlachen
Name: Pascal
23.08.2018
Posts: 118
|
Aw: Labels
i have adjusted this page. on the overview page it is correct, but when you click on the details of a product, the class does not appear with the label.
|
|
29.01.2021 21:55
|
|
admin
(Support Team)
Name: Admin
05.08.2010
Posts: 25934
|
Aw: Labels
https://www.joomshopping.com/forum/posts/12/14618.html?lang=en#4
Change 1 and 2
2 the same code
add lid<?php print $product->label_id?>
Last change: 29.01.2021 21:55
|
|
31.01.2021 12:27
|
|
admotionlachen
Name: Pascal
23.08.2018
Posts: 118
|
Aw: Labels
Das habe ich gemacht. Aber die Detailseite liegt bei mir im Verzeichnis components/jshopping/templates/addons/detailtabs > product_detailtabs.php. Darin scheint es nicht zu funktionieren (das ist der aktuelle code):
<?php if($this->product->label_id){?>
<div class="product_label">
<?php if($this->product->_label_image){?>
<img src="<?php echo $this->product->_label_image?>" alt="<?php echo htmlspecialchars($this->product->_label_name)?>" />
<?php }else{?>
<span class="label_name"><?php echo $this->product->_label_name?></span>
<?php }?>
</div>
<?php }?>
|
|
31.01.2021 19:26
|
|
admin
(Support Team)
Name: Admin
05.08.2010
Posts: 25934
|
Aw: Labels
<span class="label_name"><?php echo $this->product->_label_name?></span>
change to:
<span class="label_name lid<?php print $product->label_id?>"><?php print $product->_label_name;?></span>
Last change: 31.01.2021 19:27
|
|
01.02.2021 10:48
|
|
admotionlachen
Name: Pascal
23.08.2018
Posts: 118
|
Aw: Labels
this does not work, then only the styles appear, but the text no longer (see printscreen).
This is my code now:
<?php if($this->product->label_id){?>
<div class="product_label">
<?php if($this->product->_label_image){?>
<img src="<?php echo $this->product->_label_image?>" alt="<?php echo htmlspecialchars($this->product->_label_name)?>" />
<?php }else{?>
<span class="label_name"><?php echo $this->product->_label_name?></span>
<?php }?>
</div>
<?php }?>
Last change: 01.02.2021 10:49
|
|
01.02.2021 17:48
|
|
admin
(Support Team)
Name: Admin
05.08.2010
Posts: 25934
|
Aw: Labels
<span class="label_name"><?php echo $this->product->_label_name?></span>
change to:
<span class="label_name lid<?php print $this->product->label_id?>"><?php print $product->_label_name;?></span>
|
|
05.02.2021 07:04
|
|
admotionlachen
Name: Pascal
23.08.2018
Posts: 118
|
Aw: Labels
When I make this exact change, what happens is what I wanted to show above in the printscreen. So there must be something wrong:
<?php if($this->product->label_id){?>
<div class="product_label">
<?php if($this->product->_label_image){?>
<img src="<?php echo $this->product->_label_image?>" alt="<?php echo htmlspecialchars($this->product->_label_name)?>" />
<?php }else{?>
<span class="label_name lid<?php print $this->product->label_id?>"><?php print $product->_label_name;?></span>
<?php }?>
</div>
<?php }?>
|
|
05.02.2021 08:12
|
|
admin
(Support Team)
Name: Admin
05.08.2010
Posts: 25934
|
Aw: Labels
I see no error.
url?
|
|
05.02.2021 14:07
|
|
admotionlachen
Name: Pascal
23.08.2018
Posts: 118
|
Aw: Labels
The text is not displayed for me. Only the point that is deposited as an image. Gladly the URL attached.
Website Url: https://www.trampolinecenter.ch/de/trampoline/eckige-trampoline/trampoline-crocodile-smart-x30-300-x-400-cm
|
|
05.02.2021 16:06
|
|
admin
(Support Team)
Name: Admin
05.08.2010
Posts: 25934
|
Aw: Labels
Original product template works for $product->_label_name (and $this->product->_label_name)
your template need
$this->product->_label_name
<?php if($this->product->label_id){?>
<div class="product_label">
<?php if($this->product->_label_image){?>
<img src="<?php echo $this->product->_label_image?>" alt="<?php echo htmlspecialchars($this->product->_label_name)?>" />
<?php }else{?>
<span class="label_name lid<?php print $this->product->label_id?>"><?php print $this->product->_label_name;?></span>
<?php }?>
</div>
<?php }?>
Last change: 05.02.2021 16:07
|
|
05.02.2021 17:29
|
|
admotionlachen
Name: Pascal
23.08.2018
Posts: 118
|
Aw: Labels
Thank you! It works :-)
|
|