|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Magium\Magento\Themes; |
|
4
|
|
|
|
|
5
|
|
|
use Magium\AbstractConfigurableElement; |
|
6
|
|
|
use Magium\AbstractTestCase; |
|
7
|
|
|
|
|
8
|
|
|
|
|
9
|
|
|
abstract class AbstractThemeConfiguration extends AbstractConfigurableElement implements NavigableThemeInterface |
|
10
|
|
|
{ |
|
11
|
|
|
|
|
12
|
|
|
public $homeXpath; |
|
13
|
|
|
|
|
14
|
|
|
/** |
|
15
|
|
|
* @var string The Xpath string that finds the base of the navigation menu |
|
16
|
|
|
*/ |
|
17
|
|
|
public $navigationBaseXPathSelector; |
|
18
|
|
|
|
|
19
|
|
|
/** |
|
20
|
|
|
* @var string The Xpath string that can be used iteratively to find child navigation nodes |
|
21
|
|
|
*/ |
|
22
|
|
|
|
|
23
|
|
|
public $navigationChildXPathSelector; |
|
24
|
|
|
|
|
25
|
|
|
/** |
|
26
|
|
|
* @var string A simple, default path to use for categories. |
|
27
|
|
|
*/ |
|
28
|
|
|
|
|
29
|
|
|
public $navigationPathToSimpleProductCategory; |
|
30
|
|
|
|
|
31
|
|
|
public $navigationPathToConfigurableProductCategory; |
|
32
|
|
|
|
|
33
|
|
|
/** |
|
34
|
|
|
* @var string Xpath to add a Simple product to the cart from the product's page |
|
35
|
|
|
*/ |
|
36
|
|
|
|
|
37
|
|
|
public $addToCartXpath; |
|
38
|
|
|
|
|
39
|
|
|
public $defaultSimpleProductName; |
|
40
|
|
|
public $defaultConfigurableProductName; |
|
41
|
|
|
|
|
42
|
|
|
/** |
|
43
|
|
|
* @var string Xpath to add a Simple product to the cart from the category page |
|
44
|
|
|
*/ |
|
45
|
|
|
|
|
46
|
|
|
public $categoryAddToCartButtonXPathSelector; |
|
47
|
|
|
|
|
48
|
|
|
/** |
|
49
|
|
|
* @var string Xpath to find a product's link on a category page. Used to navigate to the product from the category |
|
50
|
|
|
*/ |
|
51
|
|
|
|
|
52
|
|
|
public $categoryProductPageXpath; |
|
53
|
|
|
|
|
54
|
|
|
public $categorySpecificProductPageXpath; |
|
55
|
|
|
|
|
56
|
|
|
|
|
57
|
|
|
/** |
|
58
|
|
|
* @var string Xpath used after a product has been added to the cart to verify that the product has been added to the cart |
|
59
|
|
|
*/ |
|
60
|
|
|
|
|
61
|
|
|
public $addToCartSuccessXpath; |
|
62
|
|
|
|
|
63
|
|
|
/** |
|
64
|
|
|
* @var string The base URL of the installation |
|
65
|
|
|
*/ |
|
66
|
|
|
|
|
67
|
|
|
public $baseUrl; |
|
68
|
|
|
|
|
69
|
|
|
/** |
|
70
|
|
|
* @var string The Xpath for extracting the price from a page |
|
71
|
|
|
*/ |
|
72
|
|
|
|
|
73
|
|
|
public $productPagePriceXpath; |
|
74
|
|
|
|
|
75
|
|
|
public $myAccountTitle; |
|
76
|
|
|
|
|
77
|
|
|
/** |
|
78
|
|
|
* @var array Instructions in an Xpath array syntax to get to the login page. |
|
79
|
|
|
*/ |
|
80
|
|
|
|
|
81
|
|
|
public $navigateToCustomerPageInstructions = []; |
|
82
|
|
|
|
|
83
|
|
|
/** |
|
84
|
|
|
* @var array Instructions in an Xpath array syntax to get to the shopping cart |
|
85
|
|
|
*/ |
|
86
|
|
|
|
|
87
|
|
|
public $cartNavigationInstructions = []; |
|
88
|
|
|
|
|
89
|
|
|
/** |
|
90
|
|
|
* @var array Instructions in an Xpath array syntax to get to the start of the checkout page |
|
91
|
|
|
*/ |
|
92
|
|
|
|
|
93
|
|
|
public $checkoutNavigationInstructions = []; |
|
94
|
|
|
|
|
95
|
|
|
/** |
|
96
|
|
|
* @var array Instructions in an Xpath array syntax to get to the customer registration page |
|
97
|
|
|
*/ |
|
98
|
|
|
|
|
99
|
|
|
public $registrationNavigationInstructions = []; |
|
100
|
|
|
|
|
101
|
|
|
/** |
|
102
|
|
|
* @var array Instructions in an Xpath array syntax to get to the customer registration page |
|
103
|
|
|
*/ |
|
104
|
|
|
|
|
105
|
|
|
public $logoutNavigationInstructions = []; |
|
106
|
|
|
|
|
107
|
|
|
public $registerFirstNameXpath; |
|
108
|
|
|
public $registerLastNameXpath; |
|
109
|
|
|
public $registerEmailXpath; |
|
110
|
|
|
public $registerPasswordXpath; |
|
111
|
|
|
public $registerConfirmPasswordXpath; |
|
112
|
|
|
public $registerNewsletterXpath; |
|
113
|
|
|
public $registerSubmitXpath; |
|
114
|
|
|
|
|
115
|
|
|
public $logoutSuccessXpath; |
|
116
|
|
|
|
|
117
|
|
|
/** |
|
118
|
|
|
* This is a hard one. Each of the summary checkout products will be iterated over until they cannot be found. Having |
|
119
|
|
|
* this work in a manner that gets all of the products, in all languages, in all themes, is quite difficult and |
|
120
|
|
|
* so the Xpath selector needs to be one that can find each individual column with an incrementing iterator. |
|
121
|
|
|
* |
|
122
|
|
|
* @see Magium\Magento\Actions\Checkout\Extractors\CartSummary for an example on how this is done |
|
123
|
|
|
* |
|
124
|
|
|
* @var string |
|
125
|
|
|
*/ |
|
126
|
|
|
|
|
127
|
|
|
public $cartSummaryCheckoutProductLoopPriceXpath; |
|
128
|
|
|
public $cartSummaryCheckoutProductLoopNameXpath; |
|
129
|
|
|
public $cartSummaryCheckoutProductLoopQtyXpath; |
|
130
|
|
|
public $cartSummaryCheckoutProductLoopSubtotalXpath; |
|
131
|
|
|
|
|
132
|
|
|
public $cartSummaryCheckoutSubTotal; |
|
133
|
|
|
public $cartSummaryCheckoutTax; |
|
134
|
|
|
public $cartSummaryCheckoutGrandTotal; |
|
135
|
|
|
public $cartSummaryCheckoutShippingTotal; |
|
136
|
|
|
|
|
137
|
|
|
public $layeredNavigationTestXpath; |
|
138
|
|
|
|
|
139
|
|
|
public $breadCrumbXpath; |
|
140
|
|
|
|
|
141
|
|
|
public $productListBaseXpath; |
|
142
|
|
|
public $productListDescriptionXpath; |
|
143
|
|
|
public $productListTitleXpath; |
|
144
|
|
|
public $productListCompareLinkXpath; |
|
145
|
|
|
public $productListImageXpath; |
|
146
|
|
|
public $productListLinkXpath; |
|
147
|
|
|
public $productListOriginalPriceXpath; |
|
148
|
|
|
public $productListPriceXpath; |
|
149
|
|
|
public $productListWishlistLinkXpath; |
|
150
|
|
|
public $productListAddToCartLinkXpath; |
|
151
|
|
|
|
|
152
|
|
|
public $productGridBaseXpath; |
|
153
|
|
|
public $productGridDescriptionXpath; |
|
154
|
|
|
public $productGridTitleXpath; |
|
155
|
|
|
public $productGridCompareLinkXpath; |
|
156
|
|
|
public $productGridImageXpath; |
|
157
|
|
|
public $productGridLinkXpath; |
|
158
|
|
|
public $productGridOriginalPriceXpath; |
|
159
|
|
|
public $productGridPriceXpath; |
|
160
|
|
|
public $productGridWishlistLinkXpath; |
|
161
|
|
|
public $productGridAddToCartLinkXpath; |
|
162
|
|
|
|
|
163
|
|
|
public $productCollectionViewModeXpath; |
|
164
|
|
|
public $productCollectionSortByXpath; |
|
165
|
|
|
public $productCollectionShowCountXpath; |
|
166
|
|
|
public $productCollectionShowCountOptionsXpath; |
|
167
|
|
|
public $productCollectionProductCountXpath; |
|
168
|
|
|
|
|
169
|
|
|
public $simpleProductQtyXpath; |
|
170
|
|
|
|
|
171
|
|
|
public $layeredNavigationBaseXpath; |
|
172
|
|
|
|
|
173
|
|
|
public $searchInputXpath; |
|
174
|
|
|
public $searchSubmitXpath; |
|
175
|
|
|
|
|
176
|
|
|
public $searchSuggestionTextXpath; |
|
177
|
|
|
public $searchSuggestionCountXpath; |
|
178
|
|
|
|
|
179
|
|
|
public $storeSwitcherInstructionsXpath; |
|
180
|
|
|
|
|
181
|
|
|
public $configurableProductLabelXpath; |
|
182
|
|
|
public $configurableSwatchSelectorXpath; |
|
183
|
|
|
public $configurableSwatchImgXpath; |
|
184
|
|
|
public $configurableSwatchNotAvailableXpath; |
|
185
|
|
|
public $configurableSwatchOptionLabelAttributeName; |
|
186
|
|
|
|
|
187
|
|
|
public $configurableProductOptionXpath; |
|
188
|
|
|
|
|
189
|
|
|
public $viewModeAttributeName; |
|
190
|
|
|
|
|
191
|
|
|
public $breadCrumbMemberXpath; |
|
192
|
|
|
public $breadCrumbSelectorXpath; |
|
193
|
|
|
|
|
194
|
|
|
public $layeredNavigationFilterNameXpath; |
|
195
|
|
|
|
|
196
|
|
|
public $layeredNavigationFilterTypesXpath; |
|
197
|
|
|
public $layeredNavigationFilterLinkXpath; |
|
198
|
|
|
public $layeredNavigationFilterNameElementXpath; |
|
199
|
|
|
public $layeredNavigationSwatchAppliesXpath; |
|
200
|
|
|
public $layeredNavigationSwatchFilterTypesXpath; |
|
201
|
|
|
public $layeredNavigationSwatchTitleAttribute; |
|
202
|
|
|
|
|
203
|
|
|
abstract public function getCustomerThemeClass(); |
|
204
|
|
|
abstract public function getCheckoutThemeClass(); |
|
205
|
|
|
|
|
206
|
|
|
public $guaranteedPageLoadedElementDisplayedXpath = '//div[contains(concat(" ",normalize-space(@class)," ")," footer ")]'; |
|
207
|
|
|
|
|
208
|
|
|
public $contactUsNameXpath = '//form[@id="contactForm"]/descendant::input[@id="name"]'; |
|
209
|
|
|
public $contactUsEmailXpath = '//form[@id="contactForm"]/descendant::input[@id="email"]'; |
|
210
|
|
|
public $contactUsTelephoneXpath = '//form[@id="contactForm"]/descendant::input[@id="telephone"]'; |
|
211
|
|
|
public $contactUsCommentXpath = '//form[@id="contactForm"]/descendant::textarea[@id="comment"]'; |
|
212
|
|
|
public $contactUsSubmitXpath = '//form[@id="contactForm"]/descendant::button'; |
|
213
|
|
|
|
|
214
|
|
|
public $useClicksToNavigate = false; |
|
215
|
|
|
|
|
216
|
|
|
public function getUseClicksToNavigate() |
|
217
|
|
|
{ |
|
218
|
|
|
return $this->useClicksToNavigate; |
|
219
|
|
|
} |
|
220
|
|
|
|
|
221
|
|
|
public function configure(AbstractTestCase $testCase) |
|
222
|
|
|
{ |
|
223
|
|
|
|
|
224
|
|
|
} |
|
225
|
|
|
|
|
226
|
|
|
/** |
|
227
|
|
|
* @return mixed |
|
228
|
|
|
*/ |
|
229
|
|
|
public function getConfigurableSwatchOptionLabelAttributeName() |
|
230
|
|
|
{ |
|
231
|
|
|
return $this->configurableSwatchOptionLabelAttributeName; |
|
232
|
|
|
} |
|
233
|
|
|
|
|
234
|
|
|
/** |
|
235
|
|
|
* @return string |
|
236
|
|
|
*/ |
|
237
|
|
|
public function getContactUsSubmitXpath() |
|
238
|
|
|
{ |
|
239
|
|
|
return $this->translatePlaceholders($this->contactUsSubmitXpath); |
|
240
|
|
|
} |
|
241
|
|
|
|
|
242
|
|
|
/** |
|
243
|
|
|
* @return string |
|
244
|
|
|
*/ |
|
245
|
|
|
public function getContactUsNameXpath() |
|
246
|
|
|
{ |
|
247
|
|
|
return $this->translatePlaceholders($this->contactUsNameXpath); |
|
248
|
|
|
} |
|
249
|
|
|
|
|
250
|
|
|
/** |
|
251
|
|
|
* @return string |
|
252
|
|
|
*/ |
|
253
|
|
|
public function getContactUsEmailXpath() |
|
254
|
|
|
{ |
|
255
|
|
|
return $this->translatePlaceholders($this->contactUsEmailXpath); |
|
256
|
|
|
} |
|
257
|
|
|
|
|
258
|
|
|
/** |
|
259
|
|
|
* @return string |
|
260
|
|
|
*/ |
|
261
|
|
|
public function getContactUsCommentXpath() |
|
262
|
|
|
{ |
|
263
|
|
|
return $this->translatePlaceholders($this->contactUsCommentXpath); |
|
264
|
|
|
} |
|
265
|
|
|
|
|
266
|
|
|
/** |
|
267
|
|
|
* @return string |
|
268
|
|
|
*/ |
|
269
|
|
|
public function getContactUsTelephoneXpath() |
|
270
|
|
|
{ |
|
271
|
|
|
return $this->translatePlaceholders($this->contactUsTelephoneXpath); |
|
272
|
|
|
} |
|
273
|
|
|
|
|
274
|
|
|
|
|
275
|
|
|
|
|
276
|
|
|
/** |
|
277
|
|
|
* @return array |
|
278
|
|
|
*/ |
|
279
|
|
|
public function getCartNavigationInstructions() |
|
280
|
|
|
{ |
|
281
|
|
|
return $this->translatePlaceholders($this->cartNavigationInstructions); |
|
282
|
|
|
} |
|
283
|
|
|
|
|
284
|
|
|
/** |
|
285
|
|
|
* @return string |
|
286
|
|
|
*/ |
|
287
|
|
|
public function getLayeredNavigationSwatchTitleAttribute() |
|
288
|
|
|
{ |
|
289
|
|
|
return $this->layeredNavigationSwatchTitleAttribute; |
|
290
|
|
|
} |
|
291
|
|
|
|
|
292
|
|
|
/** |
|
293
|
|
|
* @return mixed |
|
294
|
|
|
*/ |
|
295
|
|
|
public function getLayeredNavigationSwatchAppliesXpath($name) |
|
296
|
|
|
{ |
|
297
|
|
|
if ($this->layeredNavigationSwatchAppliesXpath) { |
|
298
|
|
|
return $this->translatePlaceholders(sprintf($this->layeredNavigationSwatchAppliesXpath, $name)); |
|
299
|
|
|
} |
|
300
|
|
|
} |
|
301
|
|
|
|
|
302
|
|
|
/** |
|
303
|
|
|
* @return mixed |
|
304
|
|
|
*/ |
|
305
|
|
|
public function getLayeredNavigationSwatchFilterTypesXpath($name) |
|
306
|
|
|
{ |
|
307
|
|
|
return $this->translatePlaceholders(sprintf($this->layeredNavigationSwatchFilterTypesXpath, $name)); |
|
308
|
|
|
} |
|
309
|
|
|
|
|
310
|
|
|
/** |
|
311
|
|
|
* @return mixed |
|
312
|
|
|
*/ |
|
313
|
|
|
public function getLayeredNavigationFilterNameElementXpath($name) |
|
314
|
|
|
{ |
|
315
|
|
|
return $this->translatePlaceholders(sprintf($this->layeredNavigationFilterNameElementXpath, $name)); |
|
316
|
|
|
} |
|
317
|
|
|
|
|
318
|
|
|
/** |
|
319
|
|
|
* @return string |
|
320
|
|
|
*/ |
|
321
|
|
|
public function getLayeredNavigationFilterTypesXpath($type) |
|
322
|
|
|
{ |
|
323
|
|
|
return $this->translatePlaceholders(sprintf($this->layeredNavigationFilterTypesXpath, $type)); |
|
324
|
|
|
} |
|
325
|
|
|
|
|
326
|
|
|
/** |
|
327
|
|
|
* @return string |
|
328
|
|
|
*/ |
|
329
|
|
|
public function getLayeredNavigationFilterLinkXpath($type) |
|
330
|
|
|
{ |
|
331
|
|
|
return $this->translatePlaceholders(sprintf($this->layeredNavigationFilterLinkXpath, $type)); |
|
332
|
|
|
} |
|
333
|
|
|
|
|
334
|
|
|
|
|
335
|
|
|
|
|
336
|
|
|
/** |
|
337
|
|
|
* @return mixed |
|
338
|
|
|
*/ |
|
339
|
|
|
public function getLayeredNavigationFilterNameXpath() |
|
340
|
|
|
{ |
|
341
|
|
|
return $this->layeredNavigationFilterNameXpath; |
|
342
|
|
|
} |
|
343
|
|
|
|
|
344
|
|
|
public function getBreadCrumbMemberXpath($name) |
|
345
|
|
|
{ |
|
346
|
|
|
return $this->getBreadCrumbXpath() . $this->translatePlaceholders(sprintf($this->breadCrumbMemberXpath, $name)); |
|
347
|
|
|
} |
|
348
|
|
|
|
|
349
|
|
|
/** |
|
350
|
|
|
* @return mixed |
|
351
|
|
|
*/ |
|
352
|
|
|
public function getBreadCrumbSelectorXpath($test) |
|
353
|
|
|
{ |
|
354
|
|
|
return $this->getBreadCrumbXpath() . sprintf($this->breadCrumbSelectorXpath, $test); |
|
355
|
|
|
} |
|
356
|
|
|
|
|
357
|
|
|
/** |
|
358
|
|
|
* @return string |
|
359
|
|
|
*/ |
|
360
|
|
|
public function getProductPagePriceXpath() |
|
361
|
|
|
{ |
|
362
|
|
|
return $this->productPagePriceXpath; |
|
363
|
|
|
} |
|
364
|
|
|
|
|
365
|
|
|
/** |
|
366
|
|
|
* @return mixed |
|
367
|
|
|
*/ |
|
368
|
|
|
public function getConfigurableProductOptionXpath($swatchCount, $label) |
|
369
|
|
|
{ |
|
370
|
|
|
|
|
371
|
|
|
return $this->translatePlaceholders( |
|
372
|
|
|
sprintf( |
|
373
|
|
|
$this->configurableProductOptionXpath, |
|
374
|
|
|
$this->getConfigurableLabelXpath(), |
|
375
|
|
|
$swatchCount, |
|
376
|
|
|
$label |
|
377
|
|
|
) |
|
378
|
|
|
); |
|
379
|
|
|
} |
|
380
|
|
|
|
|
381
|
|
|
public function getConfigurableSwatchImgXpath($swatchCount, $optionCount) |
|
382
|
|
|
{ |
|
383
|
|
|
return $this->translatePlaceholders( |
|
384
|
|
|
sprintf( |
|
385
|
|
|
$this->configurableSwatchImgXpath, |
|
386
|
|
|
$this->getConfigurableLabelXpath(), |
|
387
|
|
|
$swatchCount, |
|
388
|
|
|
$optionCount |
|
389
|
|
|
) |
|
390
|
|
|
); |
|
391
|
|
|
} |
|
392
|
|
|
|
|
393
|
|
|
/** |
|
394
|
|
|
* @return string |
|
395
|
|
|
*/ |
|
396
|
|
|
public function getConfigurableLabelXpath() |
|
397
|
|
|
{ |
|
398
|
|
|
return $this->configurableProductLabelXpath; |
|
399
|
|
|
} |
|
400
|
|
|
|
|
401
|
|
|
public function filterConfigurableProductOptionName($swatch) |
|
402
|
|
|
{ |
|
403
|
|
|
return preg_replace('/^(.+)\:$/', '$1', $swatch); |
|
404
|
|
|
} |
|
405
|
|
|
|
|
406
|
|
|
/** |
|
407
|
|
|
* @return string |
|
408
|
|
|
*/ |
|
409
|
|
|
public function getConfigurableSwatchNotAvailableXpath($swatchCount, $optionCount) |
|
410
|
|
|
{ |
|
411
|
|
|
return $this->translatePlaceholders( |
|
412
|
|
|
sprintf( |
|
413
|
|
|
$this->configurableSwatchNotAvailableXpath, |
|
414
|
|
|
$this->getConfigurableLabelXpath(), |
|
415
|
|
|
$swatchCount, |
|
416
|
|
|
$optionCount |
|
417
|
|
|
) |
|
418
|
|
|
); |
|
419
|
|
|
} |
|
420
|
|
|
|
|
421
|
|
|
/** |
|
422
|
|
|
* @return string |
|
423
|
|
|
*/ |
|
424
|
|
|
public function getConfigurableSwatchSelectorXpath($swatchCount, $optionCount) |
|
425
|
|
|
{ |
|
426
|
|
|
return $this->translatePlaceholders( |
|
427
|
|
|
sprintf( |
|
428
|
|
|
$this->configurableSwatchSelectorXpath, |
|
429
|
|
|
$this->getConfigurableLabelXpath(), |
|
430
|
|
|
$swatchCount, |
|
431
|
|
|
$optionCount |
|
432
|
|
|
) |
|
433
|
|
|
); |
|
434
|
|
|
} |
|
435
|
|
|
|
|
436
|
|
|
|
|
437
|
|
|
|
|
438
|
|
|
/** |
|
439
|
|
|
* @return mixed |
|
440
|
|
|
*/ |
|
441
|
|
|
public function getDefaultSimpleProductName() |
|
442
|
|
|
{ |
|
443
|
|
|
return $this->translatePlaceholders($this->defaultSimpleProductName); |
|
444
|
|
|
} |
|
445
|
|
|
|
|
446
|
|
|
/** |
|
447
|
|
|
* @return mixed |
|
448
|
|
|
*/ |
|
449
|
|
|
public function getDefaultConfigurableProductName() |
|
450
|
|
|
{ |
|
451
|
|
|
return $this->translatePlaceholders($this->defaultConfigurableProductName); |
|
452
|
|
|
} |
|
453
|
|
|
|
|
454
|
|
|
/** |
|
455
|
|
|
* @return mixed |
|
456
|
|
|
*/ |
|
457
|
|
|
public function getSimpleProductQtyXpath() |
|
458
|
|
|
{ |
|
459
|
|
|
return $this->simpleProductQtyXpath; |
|
460
|
|
|
} |
|
461
|
|
|
|
|
462
|
|
|
public function getGuaranteedPageLoadedElementDisplayedXpath() |
|
463
|
|
|
{ |
|
464
|
|
|
return $this->translatePlaceholders($this->guaranteedPageLoadedElementDisplayedXpath); |
|
465
|
|
|
} |
|
466
|
|
|
|
|
467
|
|
|
/** |
|
468
|
|
|
* @param mixed $guaranteedPageLoadedElementDisplayedXpath |
|
469
|
|
|
*/ |
|
470
|
|
|
public function setGuaranteedPageLoadedElementDisplayedXpath($guaranteedPageLoadedElementDisplayedXpath) |
|
471
|
|
|
{ |
|
472
|
|
|
$this->guaranteedPageLoadedElementDisplayedXpath = $guaranteedPageLoadedElementDisplayedXpath; |
|
473
|
|
|
} |
|
474
|
|
|
|
|
475
|
|
|
/** |
|
476
|
|
|
* @return mixed |
|
477
|
|
|
*/ |
|
478
|
|
|
public function getStoreSwitcherInstructionsXpath($store) |
|
479
|
|
|
{ |
|
480
|
|
|
$xpaths = $this->storeSwitcherInstructionsXpath; |
|
481
|
|
|
foreach ($xpaths as &$path) { |
|
482
|
|
|
if (strpos($path[1], '%s') !== false) { |
|
483
|
|
|
$path[1] = sprintf($path[1], $store); |
|
484
|
|
|
} |
|
485
|
|
|
} |
|
486
|
|
|
return $xpaths; |
|
487
|
|
|
} |
|
488
|
|
|
|
|
489
|
|
|
/** |
|
490
|
|
|
* @return mixed |
|
491
|
|
|
*/ |
|
492
|
|
|
public function getSearchSuggestionTextXpath($count) |
|
493
|
|
|
{ |
|
494
|
|
|
$xpath = sprintf($this->searchSuggestionTextXpath, $count); |
|
495
|
|
|
return $this->translatePlaceholders($xpath); |
|
496
|
|
|
} |
|
497
|
|
|
|
|
498
|
|
|
/** |
|
499
|
|
|
* @return mixed |
|
500
|
|
|
*/ |
|
501
|
|
|
public function getSearchSuggestionCountXpath($count) |
|
502
|
|
|
{ |
|
503
|
|
|
$xpath = sprintf($this->searchSuggestionCountXpath, $count); |
|
504
|
|
|
return $this->translatePlaceholders($xpath); |
|
505
|
|
|
} |
|
506
|
|
|
|
|
507
|
|
|
/** |
|
508
|
|
|
* @return mixed |
|
509
|
|
|
*/ |
|
510
|
|
|
public function getSearchSubmitXpath() |
|
511
|
|
|
{ |
|
512
|
|
|
return $this->translatePlaceholders($this->searchSubmitXpath); |
|
513
|
|
|
} |
|
514
|
|
|
|
|
515
|
|
|
/** |
|
516
|
|
|
* @return mixed |
|
517
|
|
|
*/ |
|
518
|
|
|
public function getSearchInputXpath() |
|
519
|
|
|
{ |
|
520
|
|
|
return $this->translatePlaceholders($this->searchInputXpath); |
|
521
|
|
|
} |
|
522
|
|
|
|
|
523
|
|
|
/** |
|
524
|
|
|
* @return mixed |
|
525
|
|
|
*/ |
|
526
|
|
|
public function getCategorySpecificProductPageXpath($productName) |
|
527
|
|
|
{ |
|
528
|
|
|
$xpath = sprintf($this->categorySpecificProductPageXpath, $productName); |
|
529
|
|
|
return $this->translatePlaceholders($xpath); |
|
530
|
|
|
} |
|
531
|
|
|
|
|
532
|
|
|
/** |
|
533
|
|
|
* @return mixed |
|
534
|
|
|
*/ |
|
535
|
|
|
public function getHomeXpath() |
|
536
|
|
|
{ |
|
537
|
|
|
return $this->translatePlaceholders($this->homeXpath); |
|
538
|
|
|
} |
|
539
|
|
|
|
|
540
|
|
|
/** |
|
541
|
|
|
* @return mixed |
|
542
|
|
|
*/ |
|
543
|
|
|
public function getLayeredNavigationBaseXpath() |
|
544
|
|
|
{ |
|
545
|
|
|
return $this->layeredNavigationBaseXpath; |
|
546
|
|
|
} |
|
547
|
|
|
|
|
548
|
|
|
/** |
|
549
|
|
|
* @return mixed |
|
550
|
|
|
*/ |
|
551
|
|
|
public function getProductCollectionViewModeXpath() |
|
552
|
|
|
{ |
|
553
|
|
|
return $this->productCollectionViewModeXpath; |
|
554
|
|
|
} |
|
555
|
|
|
|
|
556
|
|
|
/** |
|
557
|
|
|
* @return mixed |
|
558
|
|
|
*/ |
|
559
|
|
|
public function getProductCollectionSortByXpath() |
|
560
|
|
|
{ |
|
561
|
|
|
return $this->productCollectionSortByXpath; |
|
562
|
|
|
} |
|
563
|
|
|
|
|
564
|
|
|
public function getViewModeAttributeName() |
|
565
|
|
|
{ |
|
566
|
|
|
return $this->viewModeAttributeName; |
|
567
|
|
|
} |
|
568
|
|
|
|
|
569
|
|
|
/** |
|
570
|
|
|
* @return mixed |
|
571
|
|
|
*/ |
|
572
|
|
|
public function getProductCollectionShowCountXpath() |
|
573
|
|
|
{ |
|
574
|
|
|
return $this->productCollectionShowCountXpath; |
|
575
|
|
|
} |
|
576
|
|
|
|
|
577
|
|
|
/** |
|
578
|
|
|
* @return mixed |
|
579
|
|
|
*/ |
|
580
|
|
|
public function getProductCollectionShowCountOptionsXpath() |
|
581
|
|
|
{ |
|
582
|
|
|
return $this->productCollectionShowCountOptionsXpath; |
|
583
|
|
|
} |
|
584
|
|
|
|
|
585
|
|
|
/** |
|
586
|
|
|
* @return mixed |
|
587
|
|
|
*/ |
|
588
|
|
|
public function getProductCollectionProductCountXpath() |
|
589
|
|
|
{ |
|
590
|
|
|
return $this->productCollectionProductCountXpath; |
|
591
|
|
|
} |
|
592
|
|
|
|
|
593
|
|
|
|
|
594
|
|
|
|
|
595
|
|
|
/** |
|
596
|
|
|
* @return mixed |
|
597
|
|
|
*/ |
|
598
|
|
|
public function getProductListAddToCartLinkXpath($count) |
|
599
|
|
|
{ |
|
600
|
|
|
return sprintf($this->productListBaseXpath . $this->productListAddToCartLinkXpath, $count); |
|
601
|
|
|
} |
|
602
|
|
|
|
|
603
|
|
|
/** |
|
604
|
|
|
* @return mixed |
|
605
|
|
|
*/ |
|
606
|
|
|
public function getProductGridAddToCartLinkXpath($count) |
|
607
|
|
|
{ |
|
608
|
|
|
return sprintf($this->productGridBaseXpath . $this->productGridAddToCartLinkXpath, $count); |
|
609
|
|
|
} |
|
610
|
|
|
|
|
611
|
|
|
/** |
|
612
|
|
|
* @return mixed |
|
613
|
|
|
*/ |
|
614
|
|
|
public function getProductListDescriptionXpath($count) |
|
615
|
|
|
{ |
|
616
|
|
|
return sprintf($this->productListBaseXpath . $this->productListDescriptionXpath, $count); |
|
617
|
|
|
} |
|
618
|
|
|
|
|
619
|
|
|
/** |
|
620
|
|
|
* @return mixed |
|
621
|
|
|
*/ |
|
622
|
|
|
public function getProductListTitleXpath($count) |
|
623
|
|
|
{ |
|
624
|
|
|
return sprintf($this->productListBaseXpath . $this->productListTitleXpath, $count); |
|
625
|
|
|
} |
|
626
|
|
|
|
|
627
|
|
|
/** |
|
628
|
|
|
* @return mixed |
|
629
|
|
|
*/ |
|
630
|
|
|
public function getProductListCompareLinkXpath($count) |
|
631
|
|
|
{ |
|
632
|
|
|
return sprintf($this->productListBaseXpath . $this->productListCompareLinkXpath, $count); |
|
633
|
|
|
} |
|
634
|
|
|
|
|
635
|
|
|
/** |
|
636
|
|
|
* @return mixed |
|
637
|
|
|
*/ |
|
638
|
|
|
public function getProductListImageXpath($count) |
|
639
|
|
|
{ |
|
640
|
|
|
return sprintf($this->productListBaseXpath . $this->productListImageXpath, $count); |
|
641
|
|
|
} |
|
642
|
|
|
|
|
643
|
|
|
/** |
|
644
|
|
|
* @return mixed |
|
645
|
|
|
*/ |
|
646
|
|
|
public function getProductListLinkXpath($count) |
|
647
|
|
|
{ |
|
648
|
|
|
return sprintf($this->productListBaseXpath . $this->productListLinkXpath, $count); |
|
649
|
|
|
} |
|
650
|
|
|
|
|
651
|
|
|
/** |
|
652
|
|
|
* @return mixed |
|
653
|
|
|
*/ |
|
654
|
|
|
public function getProductListOriginalPriceXpath($count) |
|
655
|
|
|
{ |
|
656
|
|
|
return sprintf($this->productListBaseXpath . $this->productListOriginalPriceXpath, $count); |
|
657
|
|
|
} |
|
658
|
|
|
|
|
659
|
|
|
/** |
|
660
|
|
|
* @return mixed |
|
661
|
|
|
*/ |
|
662
|
|
|
public function getProductListPriceXpath($count) |
|
663
|
|
|
{ |
|
664
|
|
|
return sprintf($this->productListBaseXpath . $this->productListPriceXpath, $count); |
|
665
|
|
|
} |
|
666
|
|
|
|
|
667
|
|
|
/** |
|
668
|
|
|
* @return mixed |
|
669
|
|
|
*/ |
|
670
|
|
|
public function getProductListWishlistLinkXpath($count) |
|
671
|
|
|
{ |
|
672
|
|
|
return sprintf($this->productListBaseXpath . $this->productListWishlistLinkXpath, $count); |
|
673
|
|
|
} |
|
674
|
|
|
|
|
675
|
|
|
/** |
|
676
|
|
|
* @return mixed |
|
677
|
|
|
*/ |
|
678
|
|
|
public function getProductGridDescriptionXpath($count) |
|
679
|
|
|
{ |
|
680
|
|
|
return sprintf($this->productGridBaseXpath . $this->productGridDescriptionXpath, $count); |
|
681
|
|
|
} |
|
682
|
|
|
|
|
683
|
|
|
/** |
|
684
|
|
|
* @return mixed |
|
685
|
|
|
*/ |
|
686
|
|
|
public function getProductGridTitleXpath($count) |
|
687
|
|
|
{ |
|
688
|
|
|
return sprintf($this->productGridBaseXpath . $this->productGridTitleXpath, $count); |
|
689
|
|
|
} |
|
690
|
|
|
|
|
691
|
|
|
/** |
|
692
|
|
|
* @return mixed |
|
693
|
|
|
*/ |
|
694
|
|
|
public function getProductGridCompareLinkXpath($count) |
|
695
|
|
|
{ |
|
696
|
|
|
return sprintf($this->productGridBaseXpath . $this->productGridCompareLinkXpath, $count); |
|
697
|
|
|
} |
|
698
|
|
|
|
|
699
|
|
|
/** |
|
700
|
|
|
* @return mixed |
|
701
|
|
|
*/ |
|
702
|
|
|
public function getProductGridImageXpath($count) |
|
703
|
|
|
{ |
|
704
|
|
|
return sprintf($this->productGridBaseXpath . $this->productGridImageXpath, $count); |
|
705
|
|
|
} |
|
706
|
|
|
|
|
707
|
|
|
/** |
|
708
|
|
|
* @return mixed |
|
709
|
|
|
*/ |
|
710
|
|
|
public function getProductGridLinkXpath($count) |
|
711
|
|
|
{ |
|
712
|
|
|
return sprintf($this->productGridBaseXpath . $this->productGridLinkXpath, $count); |
|
713
|
|
|
} |
|
714
|
|
|
|
|
715
|
|
|
/** |
|
716
|
|
|
* @return mixed |
|
717
|
|
|
*/ |
|
718
|
|
|
public function getProductGridOriginalPriceXpath($count) |
|
719
|
|
|
{ |
|
720
|
|
|
return sprintf($this->productGridBaseXpath . $this->productGridOriginalPriceXpath, $count); |
|
721
|
|
|
} |
|
722
|
|
|
|
|
723
|
|
|
/** |
|
724
|
|
|
* @return mixed |
|
725
|
|
|
*/ |
|
726
|
|
|
public function getProductGridPriceXpath($count) |
|
727
|
|
|
{ |
|
728
|
|
|
return sprintf($this->productGridBaseXpath . $this->productGridPriceXpath, $count); |
|
729
|
|
|
} |
|
730
|
|
|
|
|
731
|
|
|
/** |
|
732
|
|
|
* @return mixed |
|
733
|
|
|
*/ |
|
734
|
|
|
public function getProductGridWishlistLinkXpath($count) |
|
735
|
|
|
{ |
|
736
|
|
|
return sprintf($this->productGridBaseXpath . $this->productGridWishlistLinkXpath, $count); |
|
737
|
|
|
} |
|
738
|
|
|
|
|
739
|
|
|
/** |
|
740
|
|
|
* @return mixed |
|
741
|
|
|
*/ |
|
742
|
|
|
public function getBreadCrumbXpath() |
|
743
|
|
|
{ |
|
744
|
|
|
return $this->breadCrumbXpath; |
|
745
|
|
|
} |
|
746
|
|
|
|
|
747
|
|
|
/** |
|
748
|
|
|
* @return mixed |
|
749
|
|
|
*/ |
|
750
|
|
|
public function getLayeredNavigationTestXpath() |
|
751
|
|
|
{ |
|
752
|
|
|
return $this->layeredNavigationTestXpath; |
|
753
|
|
|
} |
|
754
|
|
|
|
|
755
|
|
|
public function getBaseUrl() |
|
756
|
|
|
{ |
|
757
|
|
|
return $this->baseUrl; |
|
758
|
|
|
} |
|
759
|
|
|
|
|
760
|
|
|
/** |
|
761
|
|
|
* @return string |
|
762
|
|
|
*/ |
|
763
|
|
|
public function getLogoutSuccessXpath() |
|
764
|
|
|
{ |
|
765
|
|
|
return$this->translatePlaceholders( $this->logoutSuccessXpath); |
|
766
|
|
|
} |
|
767
|
|
|
|
|
768
|
|
|
/** |
|
769
|
|
|
* @return array |
|
770
|
|
|
*/ |
|
771
|
|
|
public function getLogoutNavigationInstructions() |
|
772
|
|
|
{ |
|
773
|
|
|
return $this->translatePlaceholders($this->logoutNavigationInstructions); |
|
774
|
|
|
} |
|
775
|
|
|
|
|
776
|
|
|
|
|
777
|
|
|
/** |
|
778
|
|
|
* @return string |
|
779
|
|
|
*/ |
|
780
|
|
|
public function getMyAccountTitle() |
|
781
|
|
|
{ |
|
782
|
|
|
return $this->translatePlaceholders($this->myAccountTitle); |
|
783
|
|
|
} |
|
784
|
|
|
|
|
785
|
|
|
/** |
|
786
|
|
|
* @return string |
|
787
|
|
|
*/ |
|
788
|
|
|
public function getRegisterFirstNameXpath() |
|
789
|
|
|
{ |
|
790
|
|
|
return $this->translatePlaceholders($this->registerFirstNameXpath); |
|
791
|
|
|
} |
|
792
|
|
|
|
|
793
|
|
|
/** |
|
794
|
|
|
* @return string |
|
795
|
|
|
*/ |
|
796
|
|
|
public function getRegisterLastNameXpath() |
|
797
|
|
|
{ |
|
798
|
|
|
return $this->translatePlaceholders($this->registerLastNameXpath); |
|
799
|
|
|
} |
|
800
|
|
|
|
|
801
|
|
|
/** |
|
802
|
|
|
* @return string |
|
803
|
|
|
*/ |
|
804
|
|
|
public function getRegisterEmailXpath() |
|
805
|
|
|
{ |
|
806
|
|
|
return$this->translatePlaceholders($this->registerEmailXpath); |
|
807
|
|
|
} |
|
808
|
|
|
|
|
809
|
|
|
/** |
|
810
|
|
|
* @return string |
|
811
|
|
|
*/ |
|
812
|
|
|
public function getRegisterPasswordXpath() |
|
813
|
|
|
{ |
|
814
|
|
|
return $this->translatePlaceholders($this->registerPasswordXpath); |
|
815
|
|
|
} |
|
816
|
|
|
|
|
817
|
|
|
/** |
|
818
|
|
|
* @return string |
|
819
|
|
|
*/ |
|
820
|
|
|
public function getRegisterConfirmPasswordXpath() |
|
821
|
|
|
{ |
|
822
|
|
|
return $this->translatePlaceholders($this->registerConfirmPasswordXpath); |
|
823
|
|
|
} |
|
824
|
|
|
|
|
825
|
|
|
/** |
|
826
|
|
|
* @return string |
|
827
|
|
|
*/ |
|
828
|
|
|
public function getRegisterNewsletterXpath() |
|
829
|
|
|
{ |
|
830
|
|
|
return $this->translatePlaceholders($this->registerNewsletterXpath); |
|
831
|
|
|
} |
|
832
|
|
|
|
|
833
|
|
|
/** |
|
834
|
|
|
* @return string |
|
835
|
|
|
*/ |
|
836
|
|
|
public function getRegisterSubmitXpath() |
|
837
|
|
|
{ |
|
838
|
|
|
return $this->translatePlaceholders($this->registerSubmitXpath); |
|
839
|
|
|
} |
|
840
|
|
|
|
|
841
|
|
|
/** |
|
842
|
|
|
* @return array |
|
843
|
|
|
*/ |
|
844
|
|
|
public function getRegistrationNavigationInstructions() |
|
845
|
|
|
{ |
|
846
|
|
|
return $this->translatePlaceholders($this->registrationNavigationInstructions); |
|
847
|
|
|
} |
|
848
|
|
|
|
|
849
|
|
|
public function getCheckoutNavigationInstructions() |
|
850
|
|
|
{ |
|
851
|
|
|
return $this->translatePlaceholders($this->checkoutNavigationInstructions); |
|
852
|
|
|
} |
|
853
|
|
|
|
|
854
|
|
|
public function getProductPageForCategory() |
|
855
|
|
|
{ |
|
856
|
|
|
return $this->translatePlaceholders($this->categoryProductPageXpath); |
|
857
|
|
|
} |
|
858
|
|
|
|
|
859
|
|
|
public function getAddToCartSuccessXpath() |
|
860
|
|
|
{ |
|
861
|
|
|
return $this->translatePlaceholders($this->addToCartSuccessXpath); |
|
862
|
|
|
} |
|
863
|
|
|
|
|
864
|
|
|
public function getNavigateToCustomerPageInstructions() |
|
865
|
|
|
{ |
|
866
|
|
|
return $this->translatePlaceholders($this->navigateToCustomerPageInstructions); |
|
867
|
|
|
} |
|
868
|
|
|
|
|
869
|
|
|
public function getNavigationBaseXPathSelector() |
|
870
|
|
|
{ |
|
871
|
|
|
return $this->translatePlaceholders($this->navigationBaseXPathSelector); |
|
872
|
|
|
} |
|
873
|
|
|
|
|
874
|
|
|
public function getNavigationChildXPathSelector($text) |
|
875
|
|
|
{ |
|
876
|
|
|
$return = sprintf($this->navigationChildXPathSelector, $text); |
|
877
|
|
|
return $this->translatePlaceholders($return); |
|
878
|
|
|
} |
|
879
|
|
|
|
|
880
|
|
|
public function getNavigationPathToSimpleProductCategory() |
|
881
|
|
|
{ |
|
882
|
|
|
return $this->translatePlaceholders($this->navigationPathToSimpleProductCategory); |
|
883
|
|
|
} |
|
884
|
|
|
|
|
885
|
|
|
public function getNavigationPathToConfigurableProductCategory() |
|
886
|
|
|
{ |
|
887
|
|
|
return $this->translatePlaceholders($this->navigationPathToConfigurableProductCategory); |
|
888
|
|
|
} |
|
889
|
|
|
|
|
890
|
|
|
public function getCategoryAddToCartButtonXPathSelector() |
|
891
|
|
|
{ |
|
892
|
|
|
return $this->translatePlaceholders($this->categoryAddToCartButtonXPathSelector); |
|
893
|
|
|
} |
|
894
|
|
|
|
|
895
|
|
|
|
|
896
|
|
|
public function getAddToCartXpath() |
|
897
|
|
|
{ |
|
898
|
|
|
return $this->translatePlaceholders($this->addToCartXpath); |
|
899
|
|
|
} |
|
900
|
|
|
|
|
901
|
|
|
|
|
902
|
|
|
|
|
903
|
|
|
} |
|
904
|
|
|
|