diff options
| author | Roger Rehnelt <noreply@maennchen1.de> | 2026-10-01 19:52:08 +0200 |
|---|---|---|
| committer | Roger Rehnelt <noreply@maennchen1.de> | 2026-10-01 19:52:08 +0200 |
| commit | fdef6be49c0eae438c56c16a9013a252e7ed5c07 (patch) | |
| tree | 51807e89765fb6d50b673013897aa8f9f9c06f72 /views | |
| parent | b91bfdba300259c06d6a38730b3ff59ce0046063 (diff) | |
Einhängepunkte: feste Namen, Filter je Vorlage, Knöpfe und Preise
Die Aktionen der Vorlagen feuern zusätzlich als wpsg_template_… mit einzelnen Argumenten, der Vorlagenfilter auch mit relativem Schlüssel (K40). Neue Filter für Knopfklassen, Knopftexte und Preise; die bisherigen Namen bleiben.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'views')
| -rw-r--r-- | views/blocks/product-list.phtml | 8 | ||||
| -rw-r--r-- | views/mods/mod_productindex/layouts/grid.phtml | 2 | ||||
| -rw-r--r-- | views/mods/mod_productindex/layouts/list.phtml | 2 | ||||
| -rw-r--r-- | views/mods/mod_productview/productview.phtml | 10 | ||||
| -rw-r--r-- | views/produkttemplates/standard.phtml | 8 | ||||
| -rw-r--r-- | views/produkttemplates/standard2.phtml | 8 | ||||
| -rw-r--r-- | views/produkttemplates/standard3.phtml | 8 |
7 files changed, 23 insertions, 23 deletions
diff --git a/views/blocks/product-list.phtml b/views/blocks/product-list.phtml index 802c0c9..55c229c 100644 --- a/views/blocks/product-list.phtml +++ b/views/blocks/product-list.phtml @@ -34,9 +34,9 @@ <?php if ($this->canDisplayPrice()) { $price = $oProduct->getPrice($product_id); ?> <div class="wpsg-product-list__price"> <?php if ($this->hasMod('wpsg_mod_productvariants') && $this->callMod('wpsg_mod_productvariants', 'isVariantsProduct', [$product_id])) { ?> - <?php echo esc_html(wpsg_translate(__('ab #1#', 'wpsg'), wpsg_ff($price, $currency))); ?> + <?php echo wpsg_translate(esc_html__('ab #1#', 'wpsg'), wpsg_price_html($price, 'list')); ?> <?php } else { ?> - <?php echo esc_html(wpsg_ff($price, $currency)); ?> + <?php echo wpsg_price_html($price, 'list'); ?> <?php } ?> </div> <?php if ($this->hasMod('wpsg_mod_fuellmenge')) { ?> @@ -53,10 +53,10 @@ <input type="hidden" name="wpsg[produkt_id]" value="<?php echo esc_attr((string)$product_id); ?>" /> <input type="hidden" name="wpsg[menge]" value="1" /> <input type="hidden" name="myReferer" value="<?php echo esc_attr($this->getCurrentURL()); ?>" /> - <button type="submit" name="wpsg[submit]" value="1" class="wpsg_button wpsg_add_basket<?php echo wpsg_button_class(); ?>"><?php echo esc_html__('In den Warenkorb', 'wpsg'); ?><span class="screen-reader-text"><?php echo esc_html(': '.$name); ?></span></button> + <button type="submit" name="wpsg[submit]" value="1" class="wpsg_button wpsg_add_basket<?php echo wpsg_button_class(); ?>"><?php echo esc_html(wpsg_button_text('add_to_basket', __('In den Warenkorb', 'wpsg'))); ?><span class="screen-reader-text"><?php echo esc_html(': '.$name); ?></span></button> </form> <?php } else { ?> - <a class="wpsg_button<?php echo wpsg_button_class(); ?>" href="<?php echo esc_url($p['url']); ?>"><?php echo esc_html__('Zum Produkt', 'wpsg'); ?><span class="screen-reader-text"><?php echo esc_html(': '.$name); ?></span></a> + <a class="wpsg_button<?php echo wpsg_button_class(); ?>" href="<?php echo esc_url($p['url']); ?>"><?php echo esc_html(wpsg_button_text('to_product', __('Zum Produkt', 'wpsg'))); ?><span class="screen-reader-text"><?php echo esc_html(': '.$name); ?></span></a> <?php } ?> </div> diff --git a/views/mods/mod_productindex/layouts/grid.phtml b/views/mods/mod_productindex/layouts/grid.phtml index f9228c4..bf43c7c 100644 --- a/views/mods/mod_productindex/layouts/grid.phtml +++ b/views/mods/mod_productindex/layouts/grid.phtml @@ -171,7 +171,7 @@ <?php if (false) { ?>
<span class="wpsg_produkt_soldout"><?php echo __('Produkt ausverkauft', 'wpsg'); ?></span>
<?php } else { ?>
- <a class="wpsg_button<?php echo wpsg_button_class(); ?>" title="<?php echo __('Zur Detailseite des Produkts', 'wpsg'); ?>" href="<?php echo wpsg_url($p['url']); ?>"><?php echo __('Zum Produkt', 'wpsg'); ?></a>
+ <a class="wpsg_button<?php echo wpsg_button_class(); ?>" title="<?php echo __('Zur Detailseite des Produkts', 'wpsg'); ?>" href="<?php echo wpsg_url($p['url']); ?>"><?php echo esc_html(wpsg_button_text('to_product', __('Zum Produkt', 'wpsg'))); ?></a>
<?php } ?>
</div>
diff --git a/views/mods/mod_productindex/layouts/list.phtml b/views/mods/mod_productindex/layouts/list.phtml index c62890b..9bac616 100644 --- a/views/mods/mod_productindex/layouts/list.phtml +++ b/views/mods/mod_productindex/layouts/list.phtml @@ -175,7 +175,7 @@ <?php if (false) { ?>
<span class="wpsg_produkt_soldout"><?php echo __('Produkt ausverkauft', 'wpsg'); ?></span>
<?php } else { ?>
- <a class="wpsg_button<?php echo wpsg_button_class(); ?>" title="<?php echo __('Zur Detailseite des Produkts', 'wpsg'); ?>" href="<?php echo wpsg_url($p['url']); ?>"><?php echo __('Zum Produkt', 'wpsg'); ?></a>
+ <a class="wpsg_button<?php echo wpsg_button_class(); ?>" title="<?php echo __('Zur Detailseite des Produkts', 'wpsg'); ?>" href="<?php echo wpsg_url($p['url']); ?>"><?php echo esc_html(wpsg_button_text('to_product', __('Zum Produkt', 'wpsg'))); ?></a>
<?php } ?>
</div>
diff --git a/views/mods/mod_productview/productview.phtml b/views/mods/mod_productview/productview.phtml index 66ee06f..0319b84 100644 --- a/views/mods/mod_productview/productview.phtml +++ b/views/mods/mod_productview/productview.phtml @@ -90,10 +90,10 @@ <?php if ($oProduct->canDisplayPrice()) { $price = $oProduct->getPrice(); $oldPrice = $oProduct->getOldPrice(); ?> <p class="wpsg-pv__price"> <?php if ($oldPrice !== false && $oldPrice != $price) { ?> - <span class="wpsg-pv__price-current wpsg_mod_productview_current"><?php echo esc_html(wpsg_ff($price, $currency)); ?></span> - <del class="wpsg-pv__price-old wpsg_mod_productview_oldprice"><?php echo esc_html(wpsg_ff($oldPrice, $currency)); ?></del> + <span class="wpsg-pv__price-current wpsg_mod_productview_current"><?php echo wpsg_price_html($price, 'list'); ?></span> + <del class="wpsg-pv__price-old wpsg_mod_productview_oldprice"><?php echo wpsg_price_html($oldPrice, 'list_old'); ?></del> <?php } else { ?> - <span class="wpsg-pv__price-current"><?php echo esc_html(wpsg_ff($price, $currency)); ?></span> + <span class="wpsg-pv__price-current"><?php echo wpsg_price_html($price, 'list'); ?></span> <?php } ?> </p> <?php if ($this->hasMod('wpsg_mod_fuellmenge')) { ?> @@ -134,10 +134,10 @@ <input type="hidden" name="wpsg[produkt_id]" value="<?php echo esc_attr((string)$product_id); ?>" /> <input type="hidden" name="wpsg[menge]" value="1" /> <input type="hidden" name="myReferer" value="<?php echo esc_attr($v['url']); ?>" /> - <button type="submit" name="wpsg[submit]" value="1" class="wpsg_button wpsg_add_basket<?php echo wpsg_button_class(); ?>"><?php echo esc_html__('In den Warenkorb', 'wpsg'); ?><span class="screen-reader-text"><?php echo esc_html(': '.$name); ?></span></button> + <button type="submit" name="wpsg[submit]" value="1" class="wpsg_button wpsg_add_basket<?php echo wpsg_button_class(); ?>"><?php echo esc_html(wpsg_button_text('add_to_basket', __('In den Warenkorb', 'wpsg'))); ?><span class="screen-reader-text"><?php echo esc_html(': '.$name); ?></span></button> </form> <?php } ?> - <a class="wpsg_button<?php echo wpsg_button_class(); ?>" href="<?php echo esc_url($url); ?>"><?php echo esc_html__('Zum Produkt', 'wpsg'); ?><span class="screen-reader-text"><?php echo esc_html(': '.$name); ?></span></a> + <a class="wpsg_button<?php echo wpsg_button_class(); ?>" href="<?php echo esc_url($url); ?>"><?php echo esc_html(wpsg_button_text('to_product', __('Zum Produkt', 'wpsg'))); ?><span class="screen-reader-text"><?php echo esc_html(': '.$name); ?></span></a> </div> </div> diff --git a/views/produkttemplates/standard.phtml b/views/produkttemplates/standard.phtml index d85957d..9cc7ba1 100644 --- a/views/produkttemplates/standard.phtml +++ b/views/produkttemplates/standard.phtml @@ -119,10 +119,10 @@ <?php $oldPrice = $this->view['oProduct']->getOldPrice(); ?>
<?php if ($oldPrice !== false && $oldPrice != $this->view['oProduct']->getPrice($this->view['data']['product_key'])) { ?>
- <span class="wpsg_mod_productview_price wpsg_mod_productview_current"><?php echo wpsg_ff($this->view['oProduct']->getPrice($this->view['data']['product_key']), $this->get_option('wpsg_currency')); ?></span>
- <span class="wpsg_mod_productview_oldprice"><?php echo wpsg_ff($oldPrice, $this->get_option('wpsg_currency')); ?></span>
+ <span class="wpsg_mod_productview_price wpsg_mod_productview_current"><?php echo wpsg_price_html($this->view['oProduct']->getPrice($this->view['data']['product_key']), 'product'); ?></span>
+ <span class="wpsg_mod_productview_oldprice"><?php echo wpsg_price_html($oldPrice, 'product_old'); ?></span>
<?php } else { ?>
- <span class="wpsg_mod_productview_price"><?php echo wpsg_ff($this->view['oProduct']->getPrice($this->view['data']['product_key']), $this->get_option('wpsg_currency')); ?></span>
+ <span class="wpsg_mod_productview_price"><?php echo wpsg_price_html($this->view['oProduct']->getPrice($this->view['data']['product_key']), 'product'); ?></span>
<?php } ?>
</div>
@@ -336,7 +336,7 @@ <input type="text" value="<?php echo ((wpsg_isSizedInt($this->view['data']['menge']))?$this->view['data']['menge']:'1'); ?>" name="wpsg[menge]" class="wpsg_menge" id="wpsg_menge_<?php echo $this->getTemplateIndex(); ?>" <?php echo (($this->view['data']['basket_multiple'] == 4)?' readonly="readonly" ':''); ?> />
- <input class="wpsg_button wpsg_add_basket wpsg_add_basket_<?php echo $this->getTemplateIndex(); ?><?php echo wpsg_button_class(); ?>" type="submit" value="<?php echo __('In den Warenkorb', 'wpsg'); ?>" name="wpsg[submit]" />
+ <input class="wpsg_button wpsg_add_basket wpsg_add_basket_<?php echo $this->getTemplateIndex(); ?><?php echo wpsg_button_class(); ?>" type="submit" value="<?php echo esc_attr(wpsg_button_text('add_to_basket', __('In den Warenkorb', 'wpsg'))); ?>" name="wpsg[submit]" />
<?php echo do_action('wpsg_producttemplate_afterButton'); ?>
diff --git a/views/produkttemplates/standard2.phtml b/views/produkttemplates/standard2.phtml index 3439979..9ea88cb 100644 --- a/views/produkttemplates/standard2.phtml +++ b/views/produkttemplates/standard2.phtml @@ -118,10 +118,10 @@ <?php $oldPrice = $this->view['oProduct']->getOldPrice(); ?>
<?php if ($oldPrice !== false && $oldPrice != $this->view['oProduct']->getPrice($this->view['data']['product_key'])) { ?>
- <span class="wpsg_mod_productview_price wpsg_mod_productview_current"><?php echo wpsg_ff($this->view['oProduct']->getPrice($this->view['data']['product_key']), $this->get_option('wpsg_currency')); ?></span>
- <span class="wpsg_mod_productview_oldprice"><?php echo wpsg_ff($oldPrice, $this->get_option('wpsg_currency')); ?></span>
+ <span class="wpsg_mod_productview_price wpsg_mod_productview_current"><?php echo wpsg_price_html($this->view['oProduct']->getPrice($this->view['data']['product_key']), 'product'); ?></span>
+ <span class="wpsg_mod_productview_oldprice"><?php echo wpsg_price_html($oldPrice, 'product_old'); ?></span>
<?php } else { ?>
- <span class="wpsg_mod_productview_price"><?php echo wpsg_ff($this->view['oProduct']->getPrice($this->view['data']['product_key']), $this->get_option('wpsg_currency')); ?></span>
+ <span class="wpsg_mod_productview_price"><?php echo wpsg_price_html($this->view['oProduct']->getPrice($this->view['data']['product_key']), 'product'); ?></span>
<?php } ?>
</div>
@@ -321,7 +321,7 @@ <input type="text" value="<?php echo ((wpsg_isSizedInt($this->view['data']['menge']))?$this->view['data']['menge']:'1'); ?>" name="wpsg[menge]" class="wpsg_menge" id="wpsg_menge_<?php echo $this->getTemplateIndex(); ?>" <?php echo (($this->view['data']['basket_multiple'] == 4)?' readonly="readonly" ':''); ?> />
- <input class="wpsg_button wpsg_add_basket wpsg_add_basket_<?php echo $this->getTemplateIndex(); ?><?php echo wpsg_button_class(); ?>" type="submit" value="<?php echo __('In den Warenkorb', 'wpsg'); ?>" name="wpsg[submit]" />
+ <input class="wpsg_button wpsg_add_basket wpsg_add_basket_<?php echo $this->getTemplateIndex(); ?><?php echo wpsg_button_class(); ?>" type="submit" value="<?php echo esc_attr(wpsg_button_text('add_to_basket', __('In den Warenkorb', 'wpsg'))); ?>" name="wpsg[submit]" />
<?php if (in_array($this->get_option('wpsg_afterinsert'), array('2', '3'))) { ?>
<script type="text/javascript">
diff --git a/views/produkttemplates/standard3.phtml b/views/produkttemplates/standard3.phtml index dbab5a4..1e2c510 100644 --- a/views/produkttemplates/standard3.phtml +++ b/views/produkttemplates/standard3.phtml @@ -107,10 +107,10 @@ <?php $oldPrice = $this->view['oProduct']->getOldPrice(); ?>
<?php if ($oldPrice !== false && $oldPrice != $this->view['oProduct']->getPrice($this->view['data']['product_key'])) { ?>
- <span class="wpsg_mod_productview_price wpsg_mod_productview_current"><?php echo wpsg_ff($this->view['oProduct']->getPrice($this->view['data']['product_key']), $this->get_option('wpsg_currency')); ?></span>
- <span class="wpsg_mod_productview_oldprice"><?php echo wpsg_ff($oldPrice, $this->get_option('wpsg_currency')); ?></span>
+ <span class="wpsg_mod_productview_price wpsg_mod_productview_current"><?php echo wpsg_price_html($this->view['oProduct']->getPrice($this->view['data']['product_key']), 'product'); ?></span>
+ <span class="wpsg_mod_productview_oldprice"><?php echo wpsg_price_html($oldPrice, 'product_old'); ?></span>
<?php } else { ?>
- <span class="wpsg_mod_productview_price"><?php echo wpsg_ff($this->view['oProduct']->getPrice($this->view['data']['product_key']), $this->get_option('wpsg_currency')); ?></span>
+ <span class="wpsg_mod_productview_price"><?php echo wpsg_price_html($this->view['oProduct']->getPrice($this->view['data']['product_key']), 'product'); ?></span>
<?php } ?>
</div>
@@ -293,7 +293,7 @@ <input type="text" value="<?php echo ((wpsg_isSizedInt($this->view['data']['menge']))?$this->view['data']['menge']:'1'); ?>" name="wpsg[menge]" class="wpsg_menge" id="wpsg_menge_<?php echo $this->getTemplateIndex(); ?>" <?php echo (($this->view['data']['basket_multiple'] == 4)?' readonly="readonly" ':''); ?> />
- <input class="wpsg_button wpsg_add_basket wpsg_add_basket_<?php echo $this->getTemplateIndex(); ?><?php echo wpsg_button_class(); ?>" type="submit" value="<?php echo __('In den Warenkorb', 'wpsg'); ?>" name="wpsg[submit]" />
+ <input class="wpsg_button wpsg_add_basket wpsg_add_basket_<?php echo $this->getTemplateIndex(); ?><?php echo wpsg_button_class(); ?>" type="submit" value="<?php echo esc_attr(wpsg_button_text('add_to_basket', __('In den Warenkorb', 'wpsg'))); ?>" name="wpsg[submit]" />
<?php if (in_array($this->get_option('wpsg_afterinsert'), array('2', '3'))) { ?>
<script type="text/javascript">
|
