Use this wiki plugin, introduced in Tiki6, to assign generic attributes to the current object. Attributes are provided as parameters. For tiki.geo.lat, . Removing the plugin or values in it will not remove the attributes. See Object Attributes and Relations for the available attributes.
{attributes tiki_geo_lat="" tiki_geo_lon="" tiki_geo_google_zoom="" tiki_relation_target="" tiki_relation_source=""}
Parameters |
---|
no parameters |
This method was used in a Tiki12 shop and I retrieved the code
In this use case we want to have fixed/editable values that can be used in different features of Tiki.
There is several advantages;
Here some example of plugin attributes in a wiki page and the usage in another place (mainly tracker field)
{shop_general_handling_fees="0.2"}
(mul Price (attribute (object (str wiki page) (str Constants)) (property shop.general.handling.fees)))
{shop_XXA_minimum="499" shop_XXB_minimum="599"}
// check min amount $shop_constants = TikiLib::lib('attribute')->get_attributes('wiki page', 'Constants'); if ($input->supplierOrderName->int() == TikiLib::symbols()->Supplier['XXA']) { $minimum = $shop_constants[’shop.XXA.minimum']; } else if ($input->supplierOrderName->int() == TikiLib::symbols()->Supplier['XXB']) { $minimum = $shop_constants[’shop.XXB.minimum']; } else { throw new Denied(tr('Unsupported Shop')); }
{shop_freeshipping_limit="699"}
<p class="flat_cost">{tr}Shipping{/tr} {if ($cart_total > $shop_constants.shop_freeshipping_limit)}<span class="free_shipping">₪0.00</span>{else}₪{$flat_cost|escape}{/if} {* $prefs.payment_currency|escape *}</p>