Skip to content

Commit 0daf80a

Browse files
Alignment options for widget v4 (#25)
1 parent f6f2627 commit 0daf80a

File tree

7 files changed

+130
-56
lines changed

7 files changed

+130
-56
lines changed

plugin/aplazame.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,8 @@ class WC_Aplazame_Install {
333333
'cart_widget_layout' => 'horizontal',
334334
'widget_legacy' => 'no',
335335
'product_widget_border' => 'yes',
336+
'product_widget_align' => 'center',
337+
'cart_widget_align' => 'center',
336338
);
337339

338340
public static function upgrade() {

plugin/classes/wc-aplazame-gateway.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,17 @@ public function init_form_fields() {
297297
),
298298
'default' => WC_Aplazame_Install::$defaultSettings['product_widget_layout'],
299299
),
300+
'product_widget_align' => array(
301+
'type' => 'select',
302+
'title' => __( 'Alignment', 'aplazame' ),
303+
'description' => __( 'Product widget alignment (only new widget)', 'aplazame' ),
304+
'options' => array(
305+
'left' => __( 'Left', 'aplazame' ),
306+
'center' => __( 'Center', 'aplazame' ),
307+
'right' => __( 'Right', 'aplazame' ),
308+
),
309+
'default' => WC_Aplazame_Install::$defaultSettings['product_widget_align'],
310+
),
300311
'quantity_selector' => array(
301312
'type' => 'text',
302313
'title' => __( 'Product quantity CSS selector', 'aplazame' ),
@@ -367,6 +378,17 @@ public function init_form_fields() {
367378
),
368379
'default' => WC_Aplazame_Install::$defaultSettings['cart_widget_layout'],
369380
),
381+
'cart_widget_align' => array(
382+
'type' => 'select',
383+
'title' => __( 'Alignment', 'aplazame' ),
384+
'description' => __( 'Cart widget alignment (only new widget)', 'aplazame' ),
385+
'options' => array(
386+
'left' => __( 'Left', 'aplazame' ),
387+
'center' => __( 'Center', 'aplazame' ),
388+
'right' => __( 'Right', 'aplazame' ),
389+
),
390+
'default' => WC_Aplazame_Install::$defaultSettings['cart_widget_align'],
391+
),
370392
'button_section' => array(
371393
'title' => __( 'Button', 'aplazame' ),
372394
'type' => 'title',
389 Bytes
Binary file not shown.

plugin/i18n/languages/aplazame.po

Lines changed: 52 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
msgid ""
22
msgstr ""
33
"Report-Msgid-Bugs-To: https://github.com/aplazame/woocommerce\n"
4-
"POT-Creation-Date: 2021-04-06 15:42+0000\n"
4+
"POT-Creation-Date: 2021-05-18 10:47+0000\n"
55
"Language: es_ES\n"
66
"MIME-Version: 1.0\n"
77
"Content-Type: text/plain; charset=UTF-8\n"
@@ -109,15 +109,15 @@ msgstr "Descripción del método de pago"
109109
msgid "Product widget"
110110
msgstr "Widget del producto"
111111

112-
#: classes/wc-aplazame-gateway.php:252 classes/wc-aplazame-gateway.php:329
112+
#: classes/wc-aplazame-gateway.php:252 classes/wc-aplazame-gateway.php:340
113113
msgid "Place to show"
114114
msgstr "Lugar a mostrar"
115115

116116
#: classes/wc-aplazame-gateway.php:253
117117
msgid "Widget place on product page"
118118
msgstr "Lugar del widget en la página del producto"
119119

120-
#: classes/wc-aplazame-gateway.php:255 classes/wc-aplazame-gateway.php:332
120+
#: classes/wc-aplazame-gateway.php:255 classes/wc-aplazame-gateway.php:343
121121
msgid "~ Not show ~"
122122
msgstr "~ No mostrar ~"
123123

@@ -133,27 +133,27 @@ msgstr "Después del botón de añadir al carrito"
133133
msgid "After summary"
134134
msgstr "Después del resumen"
135135

136-
#: classes/wc-aplazame-gateway.php:265 classes/wc-aplazame-gateway.php:341
136+
#: classes/wc-aplazame-gateway.php:265 classes/wc-aplazame-gateway.php:352
137137
msgid "Default instalments"
138138
msgstr "Cuotas por defecto"
139139

140140
#: classes/wc-aplazame-gateway.php:266
141141
msgid "Number of default instalments in product widget"
142142
msgstr "Número de cuotas por defecto en el widget del producto"
143143

144-
#: classes/wc-aplazame-gateway.php:267 classes/wc-aplazame-gateway.php:343
144+
#: classes/wc-aplazame-gateway.php:267 classes/wc-aplazame-gateway.php:354
145145
msgid "Optional (only numbers)"
146146
msgstr "Opcional (solo números)"
147147

148-
#: classes/wc-aplazame-gateway.php:271 classes/wc-aplazame-gateway.php:347
148+
#: classes/wc-aplazame-gateway.php:271 classes/wc-aplazame-gateway.php:358
149149
msgid "Legal notice"
150150
msgstr "Texto legal"
151151

152152
#: classes/wc-aplazame-gateway.php:272
153153
msgid "Show legal notice in product widget"
154154
msgstr "Mostrar texto legal en el widget del producto"
155155

156-
#: classes/wc-aplazame-gateway.php:273 classes/wc-aplazame-gateway.php:349
156+
#: classes/wc-aplazame-gateway.php:273 classes/wc-aplazame-gateway.php:360
157157
msgid "Show legal notice"
158158
msgstr "Mostrar texto legal"
159159

@@ -169,7 +169,7 @@ msgstr "Mostrar marco en el widget del producto (sólo nuevo widget)"
169169
msgid "Show border"
170170
msgstr "Mostrar marco"
171171

172-
#: classes/wc-aplazame-gateway.php:285 classes/wc-aplazame-gateway.php:355
172+
#: classes/wc-aplazame-gateway.php:285 classes/wc-aplazame-gateway.php:366
173173
msgid "Primary color"
174174
msgstr "Color principal"
175175

@@ -179,89 +179,113 @@ msgstr ""
179179
"Código hexadecimal del color principal para el widget del producto (sólo "
180180
"nuevo widget)"
181181

182-
#: classes/wc-aplazame-gateway.php:292 classes/wc-aplazame-gateway.php:362
182+
#: classes/wc-aplazame-gateway.php:292 classes/wc-aplazame-gateway.php:373
183183
msgid "Layout"
184184
msgstr "Disposición"
185185

186186
#: classes/wc-aplazame-gateway.php:293
187187
msgid "Layout of product widget (only new widget)"
188188
msgstr "Disposición del widget del producto (sólo nuevo widget)"
189189

190-
#: classes/wc-aplazame-gateway.php:302
190+
#: classes/wc-aplazame-gateway.php:302 classes/wc-aplazame-gateway.php:383
191+
msgid "Alignment"
192+
msgstr "Alineación"
193+
194+
#: classes/wc-aplazame-gateway.php:303
195+
msgid "Product widget alignment (only new widget)"
196+
msgstr "Alineación del widget del producto (sólo nuevo widget)"
197+
198+
#: classes/wc-aplazame-gateway.php:305 classes/wc-aplazame-gateway.php:386
199+
msgid "Left"
200+
msgstr "Izquierda"
201+
202+
#: classes/wc-aplazame-gateway.php:306 classes/wc-aplazame-gateway.php:387
203+
msgid "Center"
204+
msgstr "Centro"
205+
206+
#: classes/wc-aplazame-gateway.php:307 classes/wc-aplazame-gateway.php:388
207+
msgid "Right"
208+
msgstr "Derecha"
209+
210+
#: classes/wc-aplazame-gateway.php:313
191211
msgid "Product quantity CSS selector"
192212
msgstr "Selector CSS del número de unidades del producto"
193213

194-
#: classes/wc-aplazame-gateway.php:303
214+
#: classes/wc-aplazame-gateway.php:314
195215
msgid "CSS selector pointing to product quantity"
196216
msgstr "Selector CSS para obtener la cantidad de producto"
197217

198-
#: classes/wc-aplazame-gateway.php:308
218+
#: classes/wc-aplazame-gateway.php:319
199219
msgid "Product price CSS selector"
200220
msgstr "Selector CSS del precio del producto"
201221

202-
#: classes/wc-aplazame-gateway.php:309
222+
#: classes/wc-aplazame-gateway.php:320
203223
msgid "CSS selector pointing to product price"
204224
msgstr "Selector CSS para obtener el precio del producto"
205225

206-
#: classes/wc-aplazame-gateway.php:314
226+
#: classes/wc-aplazame-gateway.php:325
207227
msgid "Variable product price CSS selector"
208228
msgstr "Selector CSS del precio variable del producto"
209229

210-
#: classes/wc-aplazame-gateway.php:315
230+
#: classes/wc-aplazame-gateway.php:326
211231
msgid "CSS selector pointing to variable product price"
212232
msgstr "Selector CSS para obtener el precio variable del producto"
213233

214-
#: classes/wc-aplazame-gateway.php:323
234+
#: classes/wc-aplazame-gateway.php:334
215235
msgid "Cart widget"
216236
msgstr "Widget del carrito"
217237

218-
#: classes/wc-aplazame-gateway.php:330
238+
#: classes/wc-aplazame-gateway.php:341
219239
msgid "Widget place on cart page"
220240
msgstr "Lugar del widget en la página del carrito"
221241

222-
#: classes/wc-aplazame-gateway.php:333
242+
#: classes/wc-aplazame-gateway.php:344
223243
msgid "Before cart totals"
224244
msgstr "Antes del total"
225245

226-
#: classes/wc-aplazame-gateway.php:334
246+
#: classes/wc-aplazame-gateway.php:345
227247
msgid "After cart totals"
228248
msgstr "Después del total"
229249

230-
#: classes/wc-aplazame-gateway.php:342
250+
#: classes/wc-aplazame-gateway.php:353
231251
msgid "Number of default instalments in cart widget"
232252
msgstr "Número de cuotas por defecto en el widget del carrito"
233253

234-
#: classes/wc-aplazame-gateway.php:348
254+
#: classes/wc-aplazame-gateway.php:359
235255
msgid "Show legal notice in cart widget"
236256
msgstr "Mostrar texto legal en el widget del carrito"
237257

238-
#: classes/wc-aplazame-gateway.php:356
258+
#: classes/wc-aplazame-gateway.php:367
239259
msgid "Primary color hexadecimal code for cart widget (only new widget)"
240260
msgstr ""
241261
"Código hexadecimal del color principal para el widget del carrito (sólo "
242262
"nuevo widget)"
243263

244-
#: classes/wc-aplazame-gateway.php:363
264+
#: classes/wc-aplazame-gateway.php:374
245265
msgid "Layout of cart widget (only new widget)"
246266
msgstr "Disposición del widget del carrito (sólo nuevo widget)"
247267

248-
#: classes/wc-aplazame-gateway.php:371
268+
#: classes/wc-aplazame-gateway.php:384
269+
msgid "Cart widget alignment (only new widget)"
270+
msgstr "Alineación del widget del carrito (sólo nuevo widget)"
271+
272+
#: classes/wc-aplazame-gateway.php:393
249273
msgid "Button"
250274
msgstr "Botón"
251275

252-
#: classes/wc-aplazame-gateway.php:377
276+
#: classes/wc-aplazame-gateway.php:399
253277
msgid "Button Selector"
254278
msgstr "Selector del botón"
255279

256-
#: classes/wc-aplazame-gateway.php:378
280+
#: classes/wc-aplazame-gateway.php:400
257281
msgid "Aplazame Button CSS Selector"
258282
msgstr "Selector CSS del botón de pago con Aplazame"
259283

260-
#: classes/wc-aplazame-gateway.php:386
284+
#: classes/wc-aplazame-gateway.php:408
261285
msgid "Button Image"
262286
msgstr "Imagen del botón"
263287

264-
#: classes/wc-aplazame-gateway.php:387
288+
#: classes/wc-aplazame-gateway.php:409
265289
msgid "Aplazame Button Image that you want to show"
266290
msgstr "Imagen del botón de pago con Aplazame que quieres mostrar"
267291

0 commit comments

Comments
 (0)