-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added the uploading of external aliases functionality.
- Loading branch information
1 parent
57ec040
commit e63f1a5
Showing
7 changed files
with
288 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
################################################## | ||
# | ||
# Copyright (c) 2004-2008 OIC Group, Inc. | ||
# Written and Designed by Adam Kessler | ||
# | ||
# This file is part of Exponent | ||
# | ||
# Exponent is free software; you can redistribute | ||
# it and/or modify it under the terms of the GNU | ||
# General Public License as published by the Free | ||
# Software Foundation; either version 2 of the | ||
# License, or (at your option) any later version. | ||
# | ||
# GPL: http://www.gnu.org/licenses/gpl.txt | ||
# | ||
################################################## | ||
|
||
class model_alias extends expRecord { | ||
public $table = 'model_aliases'; | ||
public $validates = array( | ||
'presence_of'=>array( | ||
'model'=>array('message'=>'Model / SKU is a required field.') | ||
)); | ||
|
||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
framework/modules/ecommerce/views/store/processModelAliases.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{if $error} | ||
<span style="color: red">{$error}</span> | ||
{/if} | ||
{br} | ||
{form action=saveModelAliases controller=store} | ||
{control type="hidden" name="index" value=`$index`} | ||
{if $autocomplete} | ||
{control type="autocomplete" controller="store" action="search" name="product_title" label="Add a new item" value="Search title or SKU to add an item" schema="title,id,sef_url,expFile,model" searchmodel="product" searchoncol="title,model" jsinject=$callbacks} | ||
{control type="buttongroup" submit="Save" cancel="Cancel"} | ||
{/if} | ||
{/form} | ||
|
||
{form action=processModelAliases controller=store} | ||
{control type="hidden" name="index" value=`$index`} | ||
{control type="hidden" name="next" value='1'} | ||
{if $autocomplete} | ||
{control type="buttongroup" submit="Next"} | ||
{else} | ||
{control type="buttongroup" submit="Next" cancel="Cancel"} | ||
{/if} | ||
{/form} | ||
<h3 style="float: right;">{$count} model aliases left.</h3> | ||
{clear} | ||
<style type="text/css"> | ||
{literal} | ||
#product_title, #resultsproduct_title { | ||
width: 450px; | ||
} | ||
{/literal} | ||
</style> |
9 changes: 9 additions & 0 deletions
9
framework/modules/ecommerce/views/store/uploadModelAliases.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{form action=uploadModelAliases controller=store} | ||
{if $continue} | ||
<h2>There's a sudden interruption on the process, you can continue by clicking it <a href="{link controller=store action=deleteProcessedModelAliases}">here</a> or upload a new file below.</h2> | ||
{/if} | ||
<h4>{gettext str="Upload model aliases"}</h4> | ||
<p>{gettext str="Excel File for the model/skus aliases"}</p> | ||
<input type="file" name="modelaliases" size="50">{br}{br} | ||
{control type="buttongroup" submit="Upload Aliases" cancel="Cancel"} | ||
{/form} |