Permalink
Browse files

3.0.3

  • Loading branch information...
1 parent 5bea2ba commit edcfb608f177d4ec09246f630f2018ff140aa2e4 Kris Thom White committed Aug 22, 2013
Showing with 903 additions and 1,451 deletions.
  1. +48 −0 LICENSE.txt
  2. +14 −6 core/protected/components/Controller.php
  3. +4 −4 core/protected/components/UserIdentity.php
  4. +62 −1 core/protected/components/helpers.php
  5. +3 −3 core/protected/config/wsver.php
  6. +51 −131 core/protected/controllers/InstallController.php
  7. +2 −2 core/protected/controllers/ProductController.php
  8. +21 −4 core/protected/extensions/wsshipping/WsShipping.php
  9. +1 −1 core/protected/extensions/wsshipping/usps/models/uspsAdminForm.php
  10. +184 −119 core/protected/extensions/wsshipping/usps/usps.php
  11. +40 −3 core/protected/models/Product.php
  12. +3 −1 core/protected/models/forms/BaseCheckoutForm.php
  13. +11 −1 core/protected/modules/admin/controllers/DefaultController.php
  14. +1 −0 core/protected/modules/admin/controllers/SystemController.php
  15. +27 −17 core/protected/modules/admin/controllers/UpgradeController.php
  16. +17 −0 core/protected/modules/admin/views/default/releasenotes.php
  17. +1 −1 core/protected/modules/admin/views/upgrade/index.php
  18. +1 −1 core/protected/views-cities/site/_sharing_tools.php
  19. +0 −27 core/themes/brooklyn/README.txt
  20. BIN core/themes/brooklyn/brooklyn.png
  21. +0 −81 core/themes/brooklyn/config.xml
  22. +0 −1 core/themes/brooklyn/css/custom.css
  23. +0 −150 core/themes/brooklyn/css/dark.css
  24. BIN core/themes/brooklyn/css/images/adv_search.png
  25. BIN core/themes/brooklyn/css/images/arrow-down.png
  26. BIN core/themes/brooklyn/css/images/arrow-right.gif
  27. BIN core/themes/brooklyn/css/images/breadcrumbs_home.png
  28. BIN core/themes/brooklyn/css/images/btn_add.png
  29. BIN core/themes/brooklyn/css/images/btn_edit.png
  30. BIN core/themes/brooklyn/css/images/btn_email.png
  31. BIN core/themes/brooklyn/css/images/btn_remove.png
  32. BIN core/themes/brooklyn/css/images/checkoutarrow.png
  33. BIN core/themes/brooklyn/css/images/cross.png
  34. BIN core/themes/brooklyn/css/images/darkbg.gif
  35. BIN core/themes/brooklyn/css/images/email_footer_bg.png
  36. BIN core/themes/brooklyn/css/images/email_header_bg.png
  37. BIN core/themes/brooklyn/css/images/loginhead.png
  38. BIN core/themes/brooklyn/css/images/next-horizontal.png
  39. BIN core/themes/brooklyn/css/images/next-vertical.png
  40. BIN core/themes/brooklyn/css/images/prev-horizontal.png
  41. BIN core/themes/brooklyn/css/images/prev-vertical.png
  42. BIN core/themes/brooklyn/css/images/scroll_left.png
  43. BIN core/themes/brooklyn/css/images/scroll_right.png
  44. BIN core/themes/brooklyn/css/images/shoppingcart.png
  45. BIN core/themes/brooklyn/css/images/shoppingcartdark.png
  46. BIN core/themes/brooklyn/css/images/shoppingcartlight.png
  47. BIN core/themes/brooklyn/css/images/slash.png
  48. BIN core/themes/brooklyn/css/images/spyglass.png
  49. +0 −145 core/themes/brooklyn/css/light.css
  50. +0 −404 core/themes/brooklyn/css/style.css
  51. +0 −7 core/themes/brooklyn/views/site/index.php
  52. +1 −1 index.php
  53. +411 −340 install.php
View
48 LICENSE.txt
@@ -0,0 +1,48 @@
+
+Open Software License ("OSL") v. 3.0
+
+This Open Software License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work:
+
+Licensed under the Open Software License version 3.0
+
+ 1. Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following:
+
+ 1. to reproduce the Original Work in copies, either alone or as part of a collective work;
+
+ 2. to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work;
+
+ 3. to distribute or communicate copies of the Original Work and Derivative Works to the public, with the proviso that copies of Original Work or Derivative Works that You distribute or communicate shall be licensed under this Open Software License;
+
+ 4. to perform the Original Work publicly; and
+
+ 5. to display the Original Work publicly.
+
+ 2. Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works.
+
+ 3. Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work.
+
+ 4. Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license.
+
+ 5. External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c).
+
+ 6. Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work.
+
+ 7. Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer.
+
+ 8. Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation.
+
+ 9. Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including 'fair use' or 'fair dealing'). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c).
+
+ 10. Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware.
+
+ 11. Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License.
+
+ 12. Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License.
+
+ 13. Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable.
+
+ 14. Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+ 15. Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You.
+
+ 16. Modification of This License. This License is Copyright © 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Open Software License" or "OSL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under <insert your license name here>" or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process.
View
20 core/protected/components/Controller.php
@@ -70,17 +70,25 @@ public function init() {
$this->logoutUrl = $this->createUrl("site/logout");
+ $filename = Yii::getPathOfAlias('webroot.themes').DIRECTORY_SEPARATOR.'brooklyn';
+ if(!file_exists($filename))
+ {
+ if(!downloadBrooklyn())
+ die("missing Brooklyn");
+ else
+ $this->redirect("/");
+ }
if(!Yii::app()->theme)
{
if(_xls_get_conf('theme'))
{
- $symfile = "themes/brooklyn";
- $strOriginal = "../core/themes/brooklyn";
+ //We can't find our theme for some reason, switch back to brookyn
+ _xls_set_conf('theme','brooklyn');
+ _xls_set_conf('CHILD_THEME','light');
+ Yii::log("Couldn't find our theme, switched back to Brooklyn for emergency",
+ 'error', 'application.'.__CLASS__.".".__FUNCTION__);
+ $this->redirect("/");
- @unlink($symfile);
- $retVal = symlink($strOriginal, $symfile);
- if (!$retVal)
- die("cannot create symbolic link 'themes/brooklyn' to point to '../core/themes/brooklyn'");
} else
die("you have no theme set");
}
View
8 core/protected/components/UserIdentity.php
@@ -20,7 +20,7 @@ class UserIdentity extends CUserIdentity
*/
public function authenticate()
{
- error_log("here 2");
+
$user = Customer::model()->findByAttributes(array('email' => $this->username,'record_type'=>Customer::REGISTERED));
if (!($user instanceof Customer) || $user->email !== $this->username) {
$this->errorCode = self::ERROR_USERNAME_INVALID;
@@ -35,7 +35,7 @@ public function authenticate()
else
$this->errorCode = self::ERROR_PASSWORD_INVALID;
- } else {error_log("here 3");
+ } else {
$this->errorCode = self::ERROR_NONE;
$this->_id = $user->id;
$this->setState('fullname', $user->first_name.' '.$user->last_name);
@@ -47,10 +47,10 @@ public function authenticate()
$this->setState('role', 'admin');
else
$this->setState('role', 'user');
- error_log("here 4 ".$user->password." ".$this->password." ".$this->hash($this->password));
+
//If we used an md5 password from old webstore, let's re-encrypt it with the new format
if ($user->password == $this->hash($this->password))
- {error_log("here 5");
+ {
Yii::log("Note, user's old MD5 password upgraded ".$user->fullname, 'error', 'application.'.__CLASS__.".".__FUNCTION__);
$user->password = _xls_encrypt($this->password);
}
View
63 core/protected/components/helpers.php
@@ -66,6 +66,63 @@ function _xls_theme_config($theme)
}
+
+/**
+ * Get a file from our CDN network.
+ * @param $url
+ * @return bool|mixed
+ */
+function getFile($url)
+{
+ if(stripos($url,".lightspeedretail.com")>0)
+ {
+ $ch = curl_init();
+ curl_setopt($ch, CURLOPT_URL, $url);
+ curl_setopt($ch, CURLOPT_VERBOSE, 1);
+
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
+ curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
+
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
+
+ $resp = curl_exec($ch);
+ curl_close($ch);
+ return $resp;
+ } else return false;
+
+
+}
+
+
+/**
+ * Download the Brooklyn template. We call this during install and also on the off chance that Brooklyn suddenly
+ * goes missing.
+ */
+function downloadBrooklyn()
+{
+ $jLatest= getFile("http://updater.lightspeedretail.com/site/latestbrooklyn");
+ $result = json_decode($jLatest);
+ $strWebstoreInstall = "http://cdn.lightspeedretail.com/webstore/themes/".$result->latest->filename;
+
+ $data = getFile($strWebstoreInstall);
+ if (stripos($data,"404 - Not Found")>0 || empty($data)){
+ Yii::log("ERROR downloading themes/brooklyn.zip from LightSpeed", 'error', 'application.'.__CLASS__.".".__FUNCTION__);
+ return false;
+ }
+
+ $f=file_put_contents("themes/brooklyn.zip", $data);
+ if ($f)
+ {
+ require_once( YiiBase::getPathOfAlias('application.components'). '/zip.php');
+ extractZip("brooklyn.zip",'',YiiBase::getPathOfAlias('webroot.themes'));
+ @unlink("themes/brooklyn.zip");
+ }
+ else {
+ Yii::log("ERROR downloading themes/brooklyn.zip from LightSpeed", 'error', 'application.'.__CLASS__.".".__FUNCTION__);
+ return false;
+ }
+ return true;
+}
function _xls_regionalize($str)
{
$c = Yii::app()->params['DEFAULT_COUNTRY'];
@@ -1424,8 +1481,10 @@ function _xls_avail_languages()
}
-function _xls_check_version()
+function _xls_check_version($releasenotes = false)
{
+ if(!Yii::app()->theme) return false;
+
$url = "http://updater.lightspeedretail.com";
//$url = "http://www.lsvercheck.site";
@@ -1447,12 +1506,14 @@ function _xls_check_version()
$strTheme = "unknown";
$strThemeVersion="noupdate";
}
+
$data['webstore'] = array(
'version' => XLSWS_VERSIONBUILD,
'customer' => $storeurl,
'type' => (_xls_get_conf('LIGHTSPEED_HOSTING')==1 ? "hosted" : "self"),
'track' => (_xls_get_conf('AUTO_UPDATE_TRACK','0')==1 ? "beta" : "release"),
'theme' => $strTheme,
+ 'releasenotes' => $releasenotes,
'themeversion' => $strThemeVersion,
'schema' => _xls_get_conf('DATABASE_SCHEMA_VERSION')
View
6 core/protected/config/wsver.php
@@ -1,5 +1,5 @@
<?php
-define('XLSWS_VERSION', '3.0.2');
-define('XLSWS_VERSIONBUILD', 3020);
-define('XLSWS_BUILDDATE', '2013-08-05 16:46:18');
+define('XLSWS_VERSION', '3.0.3');
+define('XLSWS_VERSIONBUILD', 3030);
+define('XLSWS_BUILDDATE', '2013-08-22 13:25:59');
View
182 core/protected/controllers/InstallController.php
@@ -107,17 +107,19 @@ public function actionUpgrade()
if ($this->online==25) $retval = $this->actionConvertProductSEO();
if ($this->online>=32 && $this->online<=44) $retval = $this->actionImportAmazon();
if ($this->online==45) $retval = $this->actionDropcustomerfields();
- if ($this->online==46) $retval = $this->actionDropMoreCartfields();
- if ($this->online==47) $retval = $this->actionDropProductFields();
- if ($this->online==48) $retval = $this->actionCalculateInventory();
- if ($this->online==49) $retval = $this->actionUpdateConfiguration();
+ if ($this->online==46) $retval = $this->actionDropProductFields();
+ if ($this->online==47) $retval = $this->actionCalculateInventory();
+ if ($this->online==48) $retval = $this->actionUpdateConfiguration();
+ if ($this->online==49) $retval = $this->actionApplyLatestChanges();
- if(isset($_GET['debug']))
- if(isset($retval['tag']))
- $retval['tag'] .= " online ".$this->online; else $retval['tag'] = " online ".$this->online;
-
- echo json_encode($retval);
+ if($retval != null)
+ {
+ if(isset($_GET['debug']))
+ if(isset($retval['tag']))
+ $retval['tag'] .= " online ".$this->online; else $retval['tag'] = " online ".$this->online;
+ echo json_encode($retval);
+ }
}
@@ -132,6 +134,11 @@ protected function actionConvertStart()
Configuration::exportConfig();
Configuration::exportLogging();
+ //And download brooklyn as a default
+ $filename = Yii::getPathOfAlias('webroot.themes').DIRECTORY_SEPARATOR.'brooklyn';
+ if(!file_exists($filename))
+ downloadBrooklyn();
+
return array('result'=>"success",'makeline'=>2,'tag'=>'Converting cart addresses','total'=>50);
}
@@ -977,57 +984,35 @@ protected function actionDropcustomerfields()
}
- /**
- * 46 Drop fields no longer needed
- */
- protected function actionDropMoreCartfields()
- {
-
- $sqlstrings = "ALTER TABLE `xlsws_cart` DROP `full_name`;
- ALTER TABLE `xlsws_cart` DROP `phone`;
- ALTER TABLE `xlsws_cart` DROP `shipping_method`;
- ALTER TABLE `xlsws_cart` DROP `shipping_module`;
- ALTER TABLE `xlsws_cart` DROP `shipping_data`;
- ALTER TABLE `xlsws_cart` DROP `shipping_cost`;
- ALTER TABLE `xlsws_cart` DROP `shipping_sell`;
- ALTER TABLE `xlsws_cart` DROP `payment_method`;
- ALTER TABLE `xlsws_cart` DROP `payment_module`;
- ALTER TABLE `xlsws_cart` DROP `payment_data`;
- ALTER TABLE `xlsws_cart` DROP `payment_amount`;
- ALTER TABLE `xlsws_cart` DROP `datetime_posted`;
- ALTER TABLE `xlsws_cart` DROP `tracking_number`;
- ALTER TABLE `xlsws_cart` DROP `email`;
- ALTER TABLE `xlsws_cart` DROP `cost_total`;
- ALTER TABLE `xlsws_cart` DROP `sell_total`;";
-
- $arrSql = explode(";",$sqlstrings);
-
- foreach ($arrSql as $strSql)
- if (!empty($strSql))
- Yii::app()->db->createCommand($strSql)->execute();
-
-
-
- return array('result'=>"success",'makeline'=>47,'tag'=>'Removing unused database fields 3','total'=>50);
-
- }
-
-
/**
- * 47 Drop product fields
+ * 46 Drop product fields
* @return string
*/
protected function actionDropProductFields()
{
+ $elements = array('full_name','phone','shipping_method','shipping_module','shipping_data',
+ 'shipping_cost','shipping_sell','payment_method','payment_module','payment_data','payment_amount',
+ 'datetime_posted','tracking_number','email','cost_total','sell_total');
+ foreach ($elements as $element)
+ {
+ $res = Yii::app()->db->createCommand("SHOW COLUMNS FROM xlsws_cart WHERE Field='".$element."'")->execute();
+ if($res)
+ {
+ Yii::app()->db->createCommand("ALTER TABLE `xlsws_cart` DROP `".$element."`")->execute();
+ return array('result'=>"success",'makeline'=>46,'tag'=>'Removed unused database field '.$element,'total'=>50);
+
+ }
+ }
+
$elements = array('family','class_name','web_keyword1','web_keyword2','web_keyword3','meta_desc','meta_keyword');
foreach ($elements as $element)
{
$res = Yii::app()->db->createCommand("SHOW COLUMNS FROM xlsws_product WHERE Field='".$element."'")->execute();
if($res)
{
Yii::app()->db->createCommand("ALTER TABLE `xlsws_product` DROP `".$element."`")->execute();
- return array('result'=>"success",'makeline'=>47,'tag'=>'Removed unused database field '.$element,'total'=>50);
+ return array('result'=>"success",'makeline'=>46,'tag'=>'Removed unused database field '.$element,'total'=>50);
}
}
@@ -1039,23 +1024,23 @@ protected function actionDropProductFields()
Yii::app()->db->createCommand(
"ALTER TABLE `xlsws_wishlist_item` ADD CONSTRAINT `xlsws_wishlist_item_ibfk_1` FOREIGN KEY (`registry_id`) REFERENCES `xlsws_wishlist` (`id`);")->execute();
- return array('result'=>"success",'makeline'=>48,'tag'=>'Calculating available inventory','total'=>50);
+ return array('result'=>"success",'makeline'=>47,'tag'=>'Calculating available inventory','total'=>50);
}
/**
- * 48 Create request_urls and export any photos (from pre 2.5 installs)
+ * 47 Create request_urls and export any photos (from pre 2.5 installs)
*/
public function actionCalculateInventory()
{
//First, run our request_url creation if needed
$matches = Product::RecalculateInventory();
if ($matches>0)
- return array('result'=>"success",'makeline'=>48,'tag'=>'Calculating available inventory '.$matches.' products remaining','total'=>50);
+ return array('result'=>"success",'makeline'=>47,'tag'=>'Calculating available inventory '.$matches.' products remaining','total'=>50);
else
{
- return array('result'=>"success",'makeline'=>49,'tag'=>'Final cleanup','total'=>50);
+ return array('result'=>"success",'makeline'=>48,'tag'=>'Final cleanup','total'=>50);
}
@@ -1066,53 +1051,11 @@ public function actionCalculateInventory()
/**
- * 49 Cleanup details, config options that have changed, NULL where we had 0's, etc.
+ * 48 Cleanup details, config options that have changed, NULL where we had 0's, etc.
* @return string
*/
protected function actionUpdateConfiguration()
{
-
-
- //Amazon changes
- _dbx("update xlsws_category_amazon set product_type='AutoAccessory' where name1 like '%Automotive%' and product_type is null;");
- _dbx("update xlsws_category_amazon set product_type='Beauty' where name1 like '%Beauty%' and product_type is null;");
- _dbx("update xlsws_category_amazon set product_type='Beauty' where name1 like '%Beauty%' and product_type is null;");
- _dbx("update xlsws_category_amazon set product_type='CameraPhoto' where name0 like '%camera & photo%' and product_type is null;");
- _dbx("update xlsws_category_amazon set product_type='CE' where name1 like '%Electronics%' and product_type is null;");
- _dbx("update xlsws_category_amazon set product_type='Computers' where name2 like '%Computers & Accessories%' and product_type is null;");
- _dbx("update xlsws_category_amazon set product_type='FoodAndBeverages' where name1 like '%Grocery & Gourmet Food%' and product_type is null;");
- _dbx("update xlsws_category_amazon set product_type='Health' where name1 like '%Health & Personal Care%' and product_type is null;");
- _dbx("update xlsws_category_amazon set product_type='Home' where name1 like '%Home & Kitchen%' and product_type is null;");
- _dbx("update xlsws_category_amazon set product_type='Jewelry' where name1 like '%Jewelry%' and product_type is null;");
- _dbx("update xlsws_category_amazon set product_type='Jewelry' where name1 like '%Jewelry%' and product_type is null;");
- _dbx("update xlsws_category_amazon set product_type='MusicalInstruments' where name1 like '%Musical Instruments%' and product_type is null;");
- _dbx("update xlsws_category_amazon set product_type='Office' where name1 like '%Office%' and product_type is null;");
- _dbx("update xlsws_category_amazon set product_type='PetSupplies' where name1 like '%Pet Supplies%' and product_type is null;");
- _dbx("update xlsws_category_amazon set product_type='Shoes' where name1 like '%Shoes%' and product_type is null;");
- _dbx("update xlsws_category_amazon set product_type='Sports' where name1='Sports & Outdoors' and product_type is null;");
- _dbx("update xlsws_category_amazon set product_type='SWVG' where name1='Software' and product_type is null;");
- _dbx("update xlsws_category_amazon set product_type='SWVG' where name1='Video Games' and product_type is null;");
- _dbx("update xlsws_category_amazon set product_type='TiresAndWheels' where name2 like '%Tires & Wheels%' and product_type is null;");
- _dbx("update xlsws_category_amazon set product_type='Tools' where name1 like '%Tools & Home Improvement%' and product_type is null;");
- _dbx("update xlsws_category_amazon set product_type='Toys' where name1 like '%Toys & Games%' and product_type is null;");
- _dbx("update xlsws_category_amazon set product_type='ToysBaby' where name2 like '%Baby & Toddler Toys%';");
-
-
- _dbx("update xlsws_customer as a set default_billing_id=(select id from xlsws_customer_address as b where customer_id=a.id order by b.id desc limit 1)");
-
- _dbx("update xlsws_customer as a set default_shipping_id=(select id from xlsws_customer_address as b where customer_id=a.id order by b.id desc limit 1)");
-
-
-
- _dbx("update xlsws_wishlist_item set cart_item_id=null where cart_item_id=0;");
- _dbx("update xlsws_wishlist_item set purchased_by=null where purchased_by=0;");
- _dbx("update xlsws_wishlist set visibility=".Wishlist::PERSONALLIST);
- _dbx("ALTER TABLE `xlsws_wishlist` DROP `registry_password`;");
- _dbx("update xlsws_promo_code set valid_from=null where valid_from='0000-00-00';");
- _dbx("update xlsws_promo_code set valid_until=null where valid_until='0000-00-00';");
- _dbx("delete from xlsws_configuration where `key_name`='PHONE_TYPES';");
-
-
//Migrate our header image to the new folder
$objConfig = Configuration::LoadByKey('HEADER_IMAGE');
$objConfig->key_value = str_replace("/photos/","/images/header/",$objConfig->key_value);
@@ -1130,45 +1073,22 @@ protected function actionUpdateConfiguration()
$objConfig->key_value = str_replace("WebKeyword3","title",$objConfig->key_value);
$objConfig->save();
+ //What we're gonna do right here is go back.... way back...
+ _xls_set_conf('DATABASE_SCHEMA_VERSION',0);
+ return array('result'=>"success",'makeline'=>49,'tag'=>'Final cleanup','total'=>50);
+ }
+
+ protected function actionApplyLatestChanges()
+ {
+ //Now the live changes from Web Store world headquarters take over
+ $myModule = Yii::app()->getModule('admin');
+
+ Yii::app()->runController($myModule->id . '/upgrade/databaseinstall');
+
+ //We don't even have to return our own JSON status because the actionDatabaseUpgrade() does that for us.
+ return null;
- _dbx("update xlsws_configuration set configuration_type_id=15,sort_order=2 where key_name='LANGUAGES'");
- _dbx("update xlsws_configuration set sort_order=sort_order+8 where configuration_type_id=19");
- _dbx("update xlsws_configuration set `key_name`='THEME',title='Site Theme',options='THEME',
- configuration_type_id=0,sort_order=2,param=0 where `key_name`='DEFAULT_TEMPLATE'");
- _dbx("update xlsws_configuration set `key_name`='CHILD_THEME',title='Theme {color} scheme',
- options='CHILD_THEME',sort_order=3,param=0,configuration_type_id=0 where `key_name`='DEFAULT_TEMPLATE_THEME'");
- _dbx("INSERT INTO `xlsws_configuration`
- (`title`, `key_name`, `key_value`, `helper_text`, `configuration_type_id`, `sort_order`, `options`, `template_specific`, `param`, `required`)
- VALUES ('Template Viewset', 'VIEWSET', 'cities', 'The master design set for themes.', 0, 1, 'VIEWSET', 0, 0, 1)");
- _dbx("INSERT INTO `xlsws_configuration`
- (`title`, `key_name`, `key_value`, `helper_text`, `configuration_type_id`, `sort_order`, `options`, `template_specific`, `param`, `required`)
- VALUES ('Enable Language Menu', 'LANG_MENU', '0', 'Show language switch menu on website.', 15, 1, 'BOOL', 0, 0, 1)");
- _dbx("INSERT INTO `xlsws_configuration`
- (`title`, `key_name`, `key_value`, `helper_text`, `configuration_type_id`, `sort_order`, `options`, `template_specific`, `param`, `required`)
- VALUES ('Add missing translations while navigating', 'LANG_MISSING', '0', 'For creating new translations. Do NOT leave this option on, it will slow your server down.', 15, 3, 'BOOL', 0, 0, 1)");
-
- _dbx("delete from xlsws_configuration where key_name='MODERATE_REGISTRATION'");
- _dbx("INSERT INTO `xlsws_configuration`
- (`title`, `key_name`, `key_value`, `helper_text`, `configuration_type_id`, `sort_order`, `options`, `template_specific`, `param`, `required`)
- VALUES ('Moderate Customer Registration', 'MODERATE_REGISTRATION', '0',
- 'If enabled, customer registrations will need to be moderated before they are approved.', 0, 1, 'BOOL', 0, 0, 1)");
-
- _dbx("INSERT INTO `xlsws_configuration`
- (`title`, `key_name`, `key_value`, `helper_text`, `configuration_type_id`, `sort_order`, `options`, `template_specific`, `param`, `required`)
- VALUES ('Language Options', 'LANG_OPTIONS', 'en:English,fr:français',
- '', 0,0, NULL, 0, 0, 1)");
-
- _dbx("UPDATE `xlsws_configuration` SET `configuration_type_id`='0' where `key_name`='CURRENCY_FORMAT'");
- _dbx("UPDATE `xlsws_configuration` SET `title`='Require account creation',`key_name`='REQUIRE_ACCOUNT',options='BOOL' where `key_name`='ALLOW_GUEST_CHECKOUT'");
- _dbx("UPDATE `xlsws_configuration` SET `configuration_type_id`='0' where `key_name`='LOCALE'");
- _dbx("UPDATE `xlsws_configuration` SET `title`='Default Locale (Language) Code' where `key_name`='LANG_CODE'");
- _dbx("UPDATE `xlsws_configuration` SET `key_value`='300' where `key_name`='DATABASE_SCHEMA_VERSION'");
- _dbx("UPDATE `xlsws_customer` SET `pricing_level`=1 where pricing_level is null");
-
- _dbx("INSERT INTO `xlsws_modules` (`active`, `module`, `category`, `version`, `name`, `sort_order`, `configuration`, `modified`, `created`)
- VALUES (1, 'wsamazon', 'CEventProduct,CEventPhoto,CEventOrder', 1, 'Amazon MWS', 2, NULL, '2013-04-04 11:34:38', NULL);");
- return array('result'=>"success",'makeline'=>50,'total'=>50);
}
View
4 core/protected/controllers/ProductController.php
@@ -72,7 +72,7 @@ public function actionView() {
//Set breadcrumbs
$this->breadcrumbs = $model->Breadcrumbs;
- $this->pageImageUrl = _xls_site_url($model->SmallImage,true);
+ $this->pageImageUrl = $model->SmallImageAbsolute;
$objWishlistAddForm = new WishlistAddForm();
@@ -84,7 +84,7 @@ public function actionView() {
$this->setPageTitle($model->PageTitle);
$this->pageDescription = $model->PageDescription;
- $this->CanonicalUrl = $this->createAbsoluteUrl($model->Link);
+ $this->CanonicalUrl = $model->AbsoluteLink;
$this->returnUrl = $this->CanonicalUrl;
$model->intQty=1;
View
25 core/protected/extensions/wsshipping/WsShipping.php
@@ -160,17 +160,23 @@ protected function convertRetToDisplay($ret)
$arrRestrictions = $this->config['offerservices'];
else
$arrRestrictions = array($this->config['offerservices']);
+
+ $arrRestrictions = $shipClass::expandRestrictions($arrRestrictions);
}
else
$arrRestrictions = null;
-
asort($ret,SORT_NUMERIC);
- foreach($ret as $desc=>$returnval) {
+ if (isset($shipClass::$service_types)) //phpstorm flags this as an error but it's fine
+ {
+
+ $serviceTypes = $shipClass::getServiceTypes($shipClass);
+ }
+
+ foreach($ret as $desc=>$returnval)
+ {
- if (isset($shipClass::$service_types))
- $serviceTypes = $shipClass::$service_types; //phpstorm flags this as an error but it's fine
$arrReturn['price']=floatval($returnval)+ floatval($this->config['markup']);
$arrReturn['level']=$desc;
if (isset($serviceTypes[$desc]))
@@ -232,4 +238,15 @@ public function getLsProduct()
else return "SHIPPING";
}
+
+ public static function getServiceTypes($class_name)
+ {
+
+ return $class_name::$service_types;
+ }
+
+ public static function expandRestrictions($arrRestrictions)
+ {
+ return $arrRestrictions;
+ }
}
View
2 core/protected/extensions/wsshipping/usps/models/uspsAdminForm.php
@@ -63,7 +63,7 @@ public function getAdminForm()
),
'offerservices'=>array(
'type'=>'checkboxlist',
- 'items'=>usps::$service_types,
+ 'items'=>usps::getServiceTypes('usps',false),
'separator'=>'',
'template'=>'<div class="offerservices">{input} {label}</div>',
'label'=>'Offer these services<br><a onclick="selectall()">Select All</a><br><a onclick="selectnone()">Select None</a><br>'
View
303 core/protected/extensions/wsshipping/usps/usps.php
@@ -22,80 +22,84 @@ class usps extends WsShipping
public static $service_types = array(
- //These show up if you're sending a longer distance and it needs to be express
- 'Priority Mail Express 1-Day' => 'Priority Mail Express 1-Day',
- 'Priority Mail Express 1-Day Hold For Pickup' => 'Priority Mail Express 1-Day Hold For Pickup',
- 'Priority Mail Express 1-Day Flat Rate Boxes' => 'Priority Mail Express 1-Day Flat Rate Boxes',
- 'Priority Mail Express 1-Day Flat Rate Boxes Hold For Pickup' => 'Priority Mail Express 1-Day Flat Rate Boxes Hold For Pickup',
- 'Priority Mail Express 1-Day Flat Rate Envelope' => 'Priority Mail Express 1-Day Flat Rate Envelope',
- 'Priority Mail Express 1-Day Flat Rate Envelope Hold For Pickup' => 'Priority Mail Express 1-Day Flat Rate Envelope Hold For Pickup',
- 'Priority Mail Express 1-Day Legal Flat Rate Envelope' => 'Priority Mail Express 1-Day Legal Flat Rate Envelope',
- 'Priority Mail Express 1-Day Legal Flat Rate Envelope Hold For Pickup' => 'Priority Mail Express 1-Day Legal Flat Rate Envelope Hold For Pickup',
- 'Priority Mail Express 1-Day Padded Flat Rate Envelope' => 'Priority Mail Express 1-Day Padded Flat Rate Envelope',
- 'Priority Mail Express 1-Day Padded Flat Rate Envelope Hold For Pickup' => 'Priority Mail Express 1-Day Padded Flat Rate Envelope Hold For Pickup',
-
- //These show up if you're sending to your local area where you'd get 1 day anyway (i.e. NY to NY)
- 'Priority Mail 1-Day' => 'Priority Mail 1-Day',
- 'Priority Mail 1-Day Large Flat Rate Box' => 'Priority Mail 1-Day Large Flat Rate Box',
- 'Priority Mail 1-Day Medium Flat Rate Box' => 'Priority Mail 1-Day Medium Flat Rate Box',
- 'Priority Mail 1-Day Small Flat Rate Box' => 'Priority Mail 1-Day Small Flat Rate Box',
- 'Priority Mail 1-Day Flat Rate Envelope' => 'Priority Mail 1-Day Flat Rate Envelope',
- 'Priority Mail 1-Day Legal Flat Rate Envelope' => 'Priority Mail 1-Day Legal Flat Rate Envelope',
- 'Priority Mail 1-Day Padded Flat Rate Envelope' => 'Priority Mail 1-Day Padded Flat Rate Envelope',
- 'Priority Mail 1-Day Gift Card Flat Rate Envelope' => 'Priority Mail 1-Day Gift Card Flat Rate Envelope',
- 'Priority Mail 1-Day Small Flat Rate Envelope' => 'Priority Mail 1-Day Small Flat Rate Envelope',
- 'Priority Mail 1-Day Window Flat Rate Envelope' => 'Priority Mail 1-Day Window Flat Rate Envelope',
-
- //These show up for slightly slower service when sending longer distance
- 'Priority Mail 2-Day' => 'Priority Mail 2-Day',
- 'Priority Mail 2-Day Large Flat Rate Box' => 'Priority Mail 2-Day Large Flat Rate Box',
- 'Priority Mail 2-Day Medium Flat Rate Box' => 'Priority Mail 2-Day Medium Flat Rate Box',
- 'Priority Mail 2-Day Small Flat Rate Box' => 'Priority Mail 2-Day Small Flat Rate Box',
- 'Priority Mail 2-Day Flat Rate Envelope' => 'Priority Mail 2-Day Flat Rate Envelope',
- 'Priority Mail 2-Day Legal Flat Rate Envelope' => 'Priority Mail 2-Day Legal Flat Rate Envelope',
- 'Priority Mail 2-Day Padded Flat Rate Envelope' => 'Priority Mail 2-Day Padded Flat Rate Envelope',
- 'Priority Mail 2-Day Gift Card Flat Rate Envelope' => 'Priority Mail 2-Day Gift Card Flat Rate Envelope',
- 'Priority Mail 2-Day Small Flat Rate Envelope' => 'Priority Mail 2-Day Small Flat Rate Envelope',
- 'Priority Mail 2-Day Window Flat Rate Envelope' => 'Priority Mail 2-Day Window Flat Rate Envelope',
-
- //Standard delivery times
- 'Priority Mail' => 'Priority Mail',
- 'Priority Mail Large Flat Rate Box' => 'Priority Mail Large Flat Rate Box',
- 'Priority Mail Medium Flat Rate Box' => 'Priority Mail Medium Flat Rate Box',
- 'Priority Mail Small Flat Rate Box' => 'Priority Mail Small Flat Rate Box',
- 'Priority Mail Flat Rate Envelope' => 'Priority Mail Flat Rate Envelope',
- 'Priority Mail Legal Flat Rate Envelope' => 'Priority Mail Legal Flat Rate Envelope',
- 'Priority Mail Padded Flat Rate Envelope' => 'Priority Mail Padded Flat Rate Envelope',
- 'Priority Mail Gift Card Flat Rate Envelope' => 'Priority Mail Gift Card Flat Rate Envelope',
- 'Priority Mail Small Flat Rate Envelope' => 'Priority Mail Small Flat Rate Envelope',
- 'Priority Mail Window Flat Rate Envelope' => 'Priority Mail Window Flat Rate Envelope',
- 'Standard Post' => 'Standard Post',
- 'Media Mail' => 'Media Mail',
- 'Library Mail' => 'Library Mail',
-
- 'Global Express Guaranteed GXG' => 'Global Express Guaranteed GXG' ,
- 'Global Express Guaranteed Non-Document Rectangular' => 'Global Express Guaranteed Non-Document Rectangular',
- 'Global Express Guaranteed Non-Document Non-Rectangular' => 'Global Express Guaranteed Non-Document Non-Rectangular',
- 'USPS GXGtrade Envelopes' => 'USPS GXG Envelopes',
- 'Express Mail International' => 'Express Mail International',
- 'Express Mail International Flat Rate Boxes' => 'Express Mail International Flat Rate Boxes',
- 'Express Mail International Flat Rate Envelope' => 'Express Mail International Flat Rate Envelope',
- 'Express Mail International Legal Flat Rate Envelope' => 'Express Mail International Legal Flat Rate Envelope',
- 'Express Mail International Padded Flat Rate Envelope' => 'Express Mail International Padded Flat Rate Envelope',
- 'Priority Mail International' => 'Priority Mail International',
- 'Priority Mail International Large Flat Rate Box' => 'Priority Mail International Large Flat Rate Box',
- 'Priority Mail International Medium Flat Rate Box' => 'Priority Mail International Medium Flat Rate Box',
- 'Priority Mail International Small Flat Rate Box' => 'Priority Mail International Small Flat Rate Box',
- 'Priority Mail International DVD Flat Rate priced box' => 'Priority Mail International DVD Flat Rate priced box',
- 'Priority Mail International Large Video Flat Rate priced box' => 'Priority Mail International Large Video Flat Rate priced box',
- 'Priority Mail International Flat Rate Envelope' => 'Priority Mail International Flat Rate Envelope',
- 'Priority Mail International Legal Flat Rate Envelope' => 'Priority Mail International Legal Flat Rate Envelope' ,
- 'Priority Mail International Padded Flat Rate Envelope' => 'Priority Mail International Padded Flat Rate Envelope',
- 'Priority Mail International Gift Card Flat Rate Envelope' => 'Priority Mail International Gift Card Flat Rate Envelope',
- 'Priority Mail International Small Flat Rate Envelope' => 'Priority Mail International Small Flat Rate Envelope',
- 'Priority Mail International Window Flat Rate Envelope' => 'Priority Mail International Window Flat Rate Envelope' ,
- 'First-Class Package International Servicetrade' => 'First-Class Package International Service',
- 'First-Class Mail International Large Envelope' => 'First-Class Mail International Large Envelope'
+ 'First-Class Mail Large Envelope',
+ 'First-Class Mail Letter',
+ 'First-Class Mail Parcel',
+ //'First-Class Mail Postcards',
+ 'Priority Mail{0}',
+ //'Priority Mail Express{0} Hold For Pickup',
+ 'Priority Mail Express{0}',
+ 'Standard Post',
+ 'Media Mail',
+ 'Library Mail'=>'Library Mail',
+ 'Priority Mail Express{0} Flat Rate Envelope',
+ 'First-Class Mail Large Postcards',
+ 'Priority Mail{0} Flat Rate Envelope',
+ 'Priority Mail{0} Medium Flat Rate Box',
+ 'Priority Mail{0} Large Flat Rate Box',
+ 'Priority Mail Express{0} Sunday/Holiday Delivery',
+ 'Priority Mail Express{0} Sunday/Holiday Delivery Flat Rate Envelope',
+ //'Priority Mail Express{0} Flat Rate Envelope Hold For Pickup',
+ 'Priority Mail{0} Small Flat Rate Box',
+ 'Priority Mail{0} Padded Flat Rate Envelope',
+ 'Priority Mail Express{0} Legal Flat Rate Envelope',
+ //'Priority Mail Express{0} Legal Flat Rate Envelope Hold For Pickup',
+ 'Priority Mail Express{0} Sunday/Holiday Delivery Legal Flat Rate Envelope',
+ //'Priority Mail{0} Hold For Pickup',
+ //'Priority Mail{0} Large Flat Rate Box Hold For Pickup',
+ //'Priority Mail{0} Medium Flat Rate Box Hold For Pickup',
+ //'Priority Mail{0} Small Flat Rate Box Hold For Pickup',
+ //'Priority Mail{0} Flat Rate Envelope Hold For Pickup',
+ 'Priority Mail{0} Gift Card Flat Rate Envelope',
+ //'Priority Mail{0} Gift Card Flat Rate Envelope Hold For Pickup',
+ 'Priority Mail{0} Window Flat Rate Envelope',
+ //'Priority Mail{0} Window Flat Rate Envelope Hold For Pickup',
+ 'Priority Mail{0} Small Flat Rate Envelope',
+ //'Priority Mail{0} Small Flat Rate Envelope Hold For Pickup',
+ 'Priority Mail{0} Legal Flat Rate Envelope',
+ //'Priority Mail{0} Legal Flat Rate Envelope Hold For Pickup',
+ //'Priority Mail{0} Padded Flat Rate Envelope Hold For Pickup',
+ 'Priority Mail{0} Regional Rate Box A',
+ //'Priority Mail{0} Regional Rate Box A Hold For Pickup',
+ 'Priority Mail{0} Regional Rate Box B',
+ //'Priority Mail{0} Regional Rate Box B Hold For Pickup',
+ //'First-Class Package Service Hold For Pickup',
+ 'Priority Mail Express{0} Flat Rate Boxes',
+ //'Priority Mail Express{0} Flat Rate Boxes Hold For Pickup',
+ 'Priority Mail Express{0} Sunday/Holiday Delivery Flat Rate Boxes',
+ 'Priority Mail{0} Regional Rate Box C',
+ //'Priority Mail{0} Regional Rate Box C Hold For Pickup',
+ 'First-Class Package Service',
+ 'Priority Mail Express{0} Padded Flat Rate Envelope',
+ //'Priority Mail Express{0} Padded Flat Rate Envelope Hold For Pickup',
+ 'Priority Mail Express{0} Sunday/Holiday Delivery Padded Flat Rate Envelope',
+
+ 'Priority Mail Express International',
+ 'Priority Mail International',
+ 'Global Express Guaranteed (GXG)',
+ 'Global Express Guaranteed Document',
+ 'Global Express Guaranteed Non-Document Rectangular',
+ 'Global Express Guaranteed Non-Document Non-Rectangular',
+ 'Priority Mail International Flat Rate Envelope',
+ 'Priority Mail International Medium Flat Rate Box',
+ 'Priority Mail Express International Flat Rate Envelope',
+ 'Priority Mail International Large Flat Rate Box',
+ 'USPS GXG Envelopes',
+ 'First-Class Mail International Letter',
+ 'First-Class Mail International Large Envelope',
+ 'First-Class Package International Service',
+ 'Priority Mail International Small Flat Rate Box',
+ 'Priority Mail Express International Legal Flat Rate Envelope',
+ 'Priority Mail International Gift Card Flat Rate Envelope',
+ 'Priority Mail International Window Flat Rate Envelope',
+ 'Priority Mail International Small Flat Rate Envelope',
+ 'First-Class Mail International Postcard',
+ 'Priority Mail International Legal Flat Rate Envelope',
+ 'Priority Mail International Padded Flat Rate Envelope',
+ 'Priority Mail International DVD Flat Rate priced box',
+ 'Priority Mail International Large Video Flat Rate priced box',
+ 'Priority Mail Express International Flat Rate Boxes',
+ 'Priority Mail Express International Padded Flat Rate Envelope'
);
/**
@@ -108,23 +112,38 @@ public function run()
if(!isset($this->config['offerservices'])) return false;
- if (!is_null($this->CheckoutForm)) {
- $arrReturn = $this->total(null,
- $this->objCart,
- $this->CheckoutForm['shippingCountry'],
- $this->CheckoutForm['shippingPostal'],
- $this->CheckoutForm['shippingState'],
- $this->CheckoutForm['shippingCity'],
- $this->CheckoutForm['shippingAddress2'],
- $this->CheckoutForm['shippingAddress1'],
- '',
- $this->CheckoutForm['shippingLastName'],
- $this->CheckoutForm['shippingFirstName']
- );
-
- if ($arrReturn===false) return array();
- return $arrReturn;
- } else return array();
+ $weight = $this->objCart->Weight;
+ if(_xls_get_conf('WEIGHT_UNIT' , 'lb') != 'lb')
+ $weight = $weight * 2.2; // one KG is 2.2 pounds
+
+ //USPS wants a full country name
+ $countryObj = Country::LoadByCode($this->CheckoutForm->shippingCountry);
+ if($countryObj)
+ $country = $countryObj->country;
+ else
+ $country = "US";
+
+ if (empty($country)) $country = "US";
+
+ if(empty($this->config['username']) || empty($this->config['originpostcode']))
+ return false;
+
+ $this->init_vars(
+ $this->config['username'],
+ $this->config['originpostcode'],
+ $this->CheckoutForm->shippingPostal,
+ $country,
+ $this->config['markup']);
+ $this->addItem(intval($weight) , round(($weight - intval($weight)) *16 , 0) , $this->objCart->total);
+
+ $rates = $this->getRate();
+
+ if(($rates === FALSE) || (count($rates) == 0 )) {
+ Yii::log("USPS: Could not get rates. " . print_r($this , true), 'error', 'application.'.__CLASS__.".".__FUNCTION__);
+ return false;
+ }
+
+ return $this->convertRetToDisplay($rates);
}
@@ -150,29 +169,34 @@ public function run()
* @return array
*/
public function total($fields, $cart, $country = '', $zipcode = '', $state = '',
- $city = '', $address2 = '', $address1 = '', $company = '', $lname = '', $fname = '') {
-
- $config = $this->config;
+ $city = '', $address2 = '', $address1 = '', $company = '', $lname = '', $fname = '') {
- $weight = $cart->Weight;
+// $config = $this->config;
+//
+// $weight = $cart->Weight;
if(_xls_get_conf('WEIGHT_UNIT' , 'lb') != 'lb')
- $weight = $weight * 2.2; // one KG is 2.2 pounds
+ $weight = $this->objCart->Weight * 2.2; // one KG is 2.2 pounds
//USPS wants a full country name
- $countryObj = Country::LoadByCode($country);
+ $countryObj = Country::LoadByCode($this->CheckoutForm->shippingCountry);
if($countryObj)
$country = $countryObj->country;
else
$country = "US";
if (empty($country)) $country = "US";
- if(empty($config['username']) || empty($config['originpostcode']))
+ if(empty($this->config['username']) || empty($this->config['originpostcode']))
return false;
- $this->init_vars($config['username'] , $config['originpostcode'] , $zipcode , $country , $config['markup']);
- $this->addItem(intval($weight) , round(($weight - intval($weight)) *16 , 0) , $cart->Total);
+ $this->init_vars(
+ $this->config['username'],
+ $this->config['originpostcode'],
+ $this->CheckoutForm->shippingPostal,
+ $country,
+ $this->config['markup']);
+ $this->addItem(intval($weight) , round(($weight - intval($weight)) *16 , 0) , $this->objCart->total);
$rates = $this->getRate();
@@ -181,19 +205,21 @@ public function total($fields, $cart, $country = '', $zipcode = '', $state = '',
return false;
}
- asort($rates);
- $arrServices = array();
- foreach($rates as $desc=>$returnval) {
- $arrReturn['price']=floatval($returnval);
- $arrReturn['level']=$desc;
- $arrReturn['label'] = $desc;
-
- $arrServices[] = $arrReturn;
-
- }
-
-
- return $arrServices;
+ return $this->convertRetToDisplay($rates);
+
+// asort($rates);
+// $arrServices = array();
+// foreach($rates as $desc=>$returnval) {
+// $arrReturn['price']=floatval($returnval);
+// $arrReturn['level']=$desc;
+// $arrReturn['label'] = $desc;
+//
+// $arrServices[] = $arrReturn;
+//
+// }
+//
+//
+// return $arrServices;
}
/**
@@ -342,12 +368,9 @@ public function getRate($showall=false) {
}
}
- $arrMethods = array_fill_keys($this->methods, '');
- Yii::log("USPS All results. " . print_r($retval , true), 'info', 'application.'.__CLASS__.".".__FUNCTION__);
- if($showall)
- return $retval;
- else
- return array_intersect_key($retval, $arrMethods);
+ return $retval;
+
+
}
/**
@@ -425,4 +448,46 @@ private function sendUSPSRateRequest($req) {
curl_close($c);
return $page;
}
+
+
+ public static function getServiceTypes($class_name,$process_days=true)
+ {
+ if($process_days)
+ {
+ $arr = array();
+
+ foreach(self::$service_types as $value)
+ {
+ if(stripos($value,"{0}") !== false)
+ {
+ for($x=1; $x<=5; $x++)
+ $arr[] = Yii::t('usps',$value,array('{0}'=>$x."-Day"));
+ } else $arr[] = $value;
+ }
+
+ return array_combine($arr,$arr);
+ }
+
+ else
+ return array_combine(self::$service_types,self::$service_types);
+
+ }
+
+ public static function expandRestrictions($arrRestrictions)
+ {
+
+ $arr = array();
+
+ foreach($arrRestrictions as $key=>$value)
+ {
+ if(stripos($value,"{0}") !== false)
+ {
+ for($x=1; $x<=5; $x++)
+ $arr[] = Yii::t('usps',$value,array('{0}'=>" ".$x."-Day"));
+ } else $arr[] = $value;
+ }
+
+ return $arr;
+ }
+
}
View
43 core/protected/models/Product.php
@@ -434,8 +434,9 @@ public static function BuildRequestUrl($id,$title,$code)
* @param string $type :: Image size constant
* @return string
*/
- protected function GetImageLink($type = ImagesType::normal) {
- return Images::GetLink($this->image_id, $type);
+ protected function GetImageLink($type = ImagesType::normal,$absolute=false)
+ {
+ return Images::GetLink($this->image_id, $type,$absolute);
}
/**
@@ -469,6 +470,18 @@ protected function GetLink() {
}
+ public function getAbsoluteLink() {
+ if ($this->IsChild)
+ //if ($prod = Product::model()->findByPk($this->parent))
+ return $this->parent0->getAbsolutelink();
+
+ //return _xls_site_url($this->request_url."/".XLSURL::KEY_PRODUCT."/".$this->id);
+ //return Yii::app()->createUrl('/product',array('id'=>$this->id));
+
+ return Yii::app()->createAbsoluteUrl('product/view',array('id'=>$this->id,'name'=>$this->request_url));
+
+ }
+
protected function GetPageMeta($strConf = 'SEO_PRODUCT_TITLE') {
if (isset($this->family)) $family = $this->family->family; else $family="";
@@ -486,7 +499,7 @@ protected function GetPageMeta($strConf = 'SEO_PRODUCT_TITLE') {
"{family}"=>$family,
"{class}"=>$classname,
"{crumbtrail}"=>implode(" ",_xls_get_crumbtrail('names')),
- "{rcrumbtrai}"=>implode(" ",array_reverse(_xls_get_crumbtrail('names')))
+ "{rcrumbtrail}"=>implode(" ",array_reverse(_xls_get_crumbtrail('names')))
));
$strItem = strip_tags($strItem);
@@ -1300,45 +1313,69 @@ public function __get($strName) {
case 'ListingImage':
return $this->GetImageLink(ImagesType::listing);
+ case 'ListingImageAbsolute':
+ return $this->GetImageLink(ImagesType::listing,true);
+
case 'MiniImage':
return $this->GetImageLink(ImagesType::mini);
+ case 'MiniImageAbsolute':
+ return $this->GetImageLink(ImagesType::mini,true);
+
case 'MiniImageTag':
return CHtml::image(Images::GetLink($this->image_id,ImagesType::mini));
case 'PreviewImage':
return $this->GetImageLink(ImagesType::preview);
+ case 'PreviewImageAbsolute':
+ return $this->GetImageLink(ImagesType::preview,true);
+
case 'PreviewImageTag':
return CHtml::image(Images::GetLink($this->image_id,ImagesType::preview));
case 'SliderImage':
return $this->GetImageLink(ImagesType::slider);
+ case 'SliderImageAbsolute':
+ return $this->GetImageLink(ImagesType::slider,true);
+
case 'SliderImageTag':
return CHtml::image(Images::GetLink($this->image_id,ImagesType::slider));
case 'CategoryImage':
return $this->GetImageLink(ImagesType::category);
+ case 'CategoryImageAbsolute':
+ return $this->GetImageLink(ImagesType::category,true);
+
case 'CategoryImageTag':
return CHtml::image(Images::GetLink($this->image_id,ImagesType::category));
case 'PDetailImage':
return $this->GetImageLink(ImagesType::pdetail);
+ case 'PDetailImageAbsolute':
+ return $this->GetImageLink(ImagesType::pdetail,true);
+
case 'PDetailImageTag':
return CHtml::image(Images::GetLink($this->image_id,ImagesType::pdetail));
case 'SmallImage':
return $this->GetImageLink(ImagesType::small);
+ case 'SmallImageAbsolute':
+ return $this->GetImageLink(ImagesType::small,true);
+
case 'SmallImageTag':
return CHtml::image(Images::GetLink($this->image_id,ImagesType::small));
case 'Image':
return $this->GetImageLink(ImagesType::normal);
+ case 'ImageAbsolute':
+ return $this->GetImageLink(ImagesType::normal,true);
+
case 'ImageTag':
return CHtml::image(Images::GetLink($this->image_id,ImagesType::normal));
View
4 core/protected/models/forms/BaseCheckoutForm.php
@@ -225,7 +225,9 @@ public function validateCard($attribute,$params)
{
Yii::import('ext.validators.ECCValidator');
$cc = new ECCValidator();
- $cc->format = array(ECCValidator::MASTERCARD, ECCValidator::VISA);
+ $cardType = str_replace(" ","_",strtoupper($this->cardType));
+
+ $cc->format = array(constant('ECCValidator::'.$cardType));
if(!$cc->validateNumber($this->cardNumber))
$this->addError($this->cardNumber,
View
12 core/protected/modules/admin/controllers/DefaultController.php
@@ -37,7 +37,7 @@ public function accessRules()
{
return array(
array('allow',
- 'actions'=>array('edit','index','sidebar','categorymeta','updatecategory'),
+ 'actions'=>array('edit','index','sidebar','categorymeta','updatecategory','releasenotes'),
'roles'=>array('admin'),
),
array('allow',
@@ -209,4 +209,14 @@ public function actionUpdateCategory()
}
+ public function actionReleasenotes()
+ {
+ $oXML = json_decode(_xls_check_version(true));
+
+//print_r($oXML);die();
+ $this->render("releasenotes", array('oXML'=>$oXML->webstore));
+
+ }
+
+
}
View
1 core/protected/modules/admin/controllers/SystemController.php
@@ -48,6 +48,7 @@ public function beforeAction($action)
array('label'=>'Erase abandoned carts &gt; '.intval(_xls_get_conf('CART_LIFE' , 30)).' days', 'url'=>array('system/erasecarts')),
array('label'=>'System Log', 'linkOptions'=>array('class'=>'nav-header')),
array('label'=>'View Log', 'url'=>array('system/log')),
+ array('label'=>'Latest Release Notes', 'url'=>array('default/releasenotes')),
);
View
44 core/protected/modules/admin/controllers/UpgradeController.php
@@ -116,11 +116,14 @@ public function actionVerifyWriteAccess()
$strPathToCreate = $path_parts['dirname'];
- if (($v->action == 'replace' || $v->action == 'delete') && $v->status == 'critical' && file_exists($strUpgradeFileName)) {
- if (!isset($v->ignore)) {
+ if (($v->action == 'replace' || $v->action == 'delete') && $v->status == 'critical' && file_exists($strUpgradeFileName))
+ {
+ if (!isset($v->ignore))
+ {
$blnError = 1;
foreach($v->original_hash as $hash)
- if (md5_file($v->filename) == $hash) {
+ if (md5_file($v->filename) == $hash)
+ {
if (isset($_GET['check'])) echo $v->filename." matched on hash ".$hash."<br>";
$blnError=0;
} //If one of our hashes matches, clear errorflag
@@ -131,19 +134,16 @@ public function actionVerifyWriteAccess()
}
//Even if we ignore changed files, we still have to be able to write critical files
- if ($v->action == 'replace' && file_exists($v->filename) && !is_writable($v->filename)) {
+ if ($v->action == 'replace' && file_exists($v->filename) && !is_writable($v->filename))
+ {
$blnError = 1;
- $arrErrors[] = $v->filename . " (" . $v->status
- . ") doesn't have permission to write, cannot be upgraded";
+ $arrErrors[] = $v->filename." (".$v->status.") doesn't have permission to write, cannot be upgraded";
}
- if ($v->action == 'replace' && !file_exists($v->filename) && file_exists($strPathToCreate) && !is_writable($strPathToCreate)) {
+ if ($v->action == 'replace' && !file_exists($v->filename) && file_exists($strPathToCreate) && !is_writable($strPathToCreate))
+ {
$blnError = 1;
- $arrErrors[] = $v->filename . " (" . $v->status
- . ") doesn't have permission to write, cannot be upgraded";
+ $arrErrors[] = $v->filename." (".$v->status. ") doesn't have permission to write, cannot be upgraded";
}
-
-
-
}
@@ -222,7 +222,7 @@ public function actionPlaceFiles()
foreach($v->original_hash as $hash)
{
if (md5_file($strOrigFileName) == $hash) $blnReplace = true;
- if (md5_file($strOrigFileName) != $hash && $v->status == 'critical' && isset($v->ignore)) $blnReplace = true;
+ if ((md5_file($strOrigFileName) != $hash && $v->status == 'critical') || isset($v->ignore)) $blnReplace = true;
}
}
@@ -283,14 +283,19 @@ public function actionPlaceFiles()
}
- public function actionDatabaseUpgrade($online = 50)
+ public function actionDatabaseInstall()
+ {
+ $this->actionDatabaseUpgrade(44,50,'Applying latest database changes...');
+ }
+
+ public function actionDatabaseUpgrade($online = 50, $total=100, $tag='')
{
$oXML = $this->checkForDatabaseUpdates();
if ($oXML->schema == "current")
{
- echo json_encode(array('result'=>"success",'makeline'=>100,'tag'=>'','total'=>100));
+ echo json_encode(array('result'=>"success",'makeline'=>$total,'tag'=>$tag,'total'=>$total));
return;
}
@@ -324,9 +329,14 @@ public function actionDatabaseUpgrade($online = 50)
if ($oXML->schema == "current")
{
- echo json_encode(array('result'=>"success",'makeline'=>100,'tag'=>'','total'=>100));
+ echo json_encode(array('result'=>"success",'makeline'=>$total,'tag'=>$tag,'total'=>$total));
return;
- } else echo json_encode(array('result'=>"success",'makeline'=>($online+5),'tag'=>'','total'=>100));
+ } else {
+ $tag .= " ".$oXML->schema;
+ $makeline = ($online+5);
+ if ($makeline>=$total) $makeline -= 5; //keep it from artificially ending
+ echo json_encode(array('result'=>"success",'makeline'=>$makeline,'tag'=>$tag,'total'=>$total));
+ }
}
View
17 core/protected/modules/admin/views/default/releasenotes.php
@@ -0,0 +1,17 @@
+<div class="span9">
+ <div class="hero-unit">
+ <h4>Web Store update installed!</h4>
+
+ <div class="editinstructions">
+ <strong> Web Store <?php echo $oXML->displayversion ?> is now your current version.</strong>
+ <p>
+
+ </p>
+ <p>
+ <?php echo $oXML->releasenotes; ?>
+ </p>
+ </div>
+
+ </div>
+
+</div>
View
2 core/protected/modules/admin/views/upgrade/index.php
@@ -93,7 +93,7 @@ function runUpgrade(key)
if (online==obj.total) {
clearInterval(pinttimer);
- window.location.href = window.location.href.replace("upgrade/index", "");
+ window.location.href = window.location.href.replace("upgrade/index", "default/releasenotes");
}else {
prunning=0;
}
View
2 core/protected/views-cities/site/_sharing_tools.php
@@ -1,7 +1,7 @@
<div id="sharingtools">
<div id="pinterest">
<a href="http://pinterest.com/pin/create/button/?url=<?= $this->getCanonicalUrl(); ?>&media=<?=
- _xls_site_url($product->SmallImage,true); ?>&description=<?= urlencode($product->Title); ?>"
+ $product->SmallImageAbsolute; ?>&description=<?= urlencode($product->Title); ?>"
class="pin-it-button" count-layout="none"><img border="0" src="//assets.pinterest.com/images/PinExt.png"
title="Pin It"/></a></div>
<div class="g-plusone" data-size="medium" data-annotation="none" data-width="50"></div>
View
27 core/themes/brooklyn/README.txt
@@ -1,27 +0,0 @@
-README for Brooklyn theme
-
-Thank you for taking the time to read this file. Below are some very important notes on how to make changes to the look of your web store.
-
-First, DO NOT, under any circumstances, manually modify any of the files in this folder. You will notice another folder called "custom". On a brand new installation, custom is simply a copy of Brooklyn, and we include it as the best place to make a custom theme if you desire.
-
-The simple reason for this is that the Brooklyn theme may get updated automatically and any changes you make will be lost.
-
-To begin designing a custom theme, use the following directions:
-
-1. Go to Admin Panel and choose the Themes menu. Under "Manage My Themes", click the "Custom" theme and Apply. This switches Web Store to use it instead of Brooklyn (although at the beginning it's a copy so it will look identical).
-2. At this point, you can make changes to the themes/custom folder as you desire.
-
-What files you change depends on what types of changes you're trying to make. If you are simply wanting to adjust some colors, our highest recommendation is to use the included /themes/custom/css/custom.css file. You'll notice it's blank. Depending on what you want to start with, copy the contents of either light.css or dark.css to your custom.css. This gives you a great starting point. In Admin Panel under themes, change the color dropdown below your Custom theme to "custom" (the dropdown references what css file to load).
-
-Now you can make changes to the CSS coloring as you require. You can also use it to override anything in style.css since it's loaded after that file. Don't modify style.css, just copy or make new elements in custom.css since those will take priority.
-
-
-For major changes including layout, you can copy files from the viewset to your theme. Viewset files can be found in /protected/views-cities and these are the HTML/PHP layout files that make up the look of Web Store. Again, DO NOT modify anything under views-cities, at any time, ever. This will break automatic upgrades. If you want to customize any file, copy it to your themes folder in the same folder structure and change your copy.
-
-For example, to customize the customer receipt template, which can be found in /protected/views-cities/mail/_customerreceipt.php, you would copy this file to /themes/custom/views/mail/_customerreceipt.php
-
-The system works like "onion layers". If it finds the file in the theme, that's what it uses. If it's missing, it goes back to the equivalent file under the /protected folder. For this reason, you never have to modify a protected file because your theme always takes priority.
-
-One final note, you don't have to copy every view file to your theme because of the way it works. Only copy what you really want to change. This allows updates to work properly in the future.
-
-In summary: Never modify anything under /protected/views-cities or under /themes/brooklyn. Keep all your customizations under your own theme folder. This will allow you to have a great Web Store that can be continuously updated automatically and you'll never run into conflicts.
View
BIN core/themes/brooklyn/brooklyn.png
Deleted file not rendered
View
81 core/themes/brooklyn/config.xml
@@ -1,81 +0,0 @@
-<config>
- <viewset>cities</viewset>
- <name>Brooklyn</name>
- <thumbnail>brooklyn.png</thumbnail>
- <version>2.0.0</version>
- <description>Our default template, suitable for any type of business.</description>
- <noupdate>true</noupdate>
- <credit>Designed by LightSpeed</credit>
- <subthemes>
- <subtheme>
- <name>Light</name>
- <css>light</css>
- </subtheme>
- <subtheme>
- <name>Dark</name>
- <css>dark</css>
- </subtheme>
- <subtheme>
- <name>Custom</name>
- <css>custom</css>
- </subtheme>
- </subthemes>
- <defaults>
- <configuration>
- <key_name>CATEGORY_IMAGE_HEIGHT</key_name>
- <key_value>180</key_value>
- </configuration>
- <configuration>
- <key_name>CATEGORY_IMAGE_WIDTH</key_name>
- <key_value>180</key_value>
- </configuration>
- <configuration>
- <key_name>DETAIL_IMAGE_HEIGHT</key_name>
- <key_value>256</key_value>
- </configuration>
- <configuration>
- <key_name>DETAIL_IMAGE_WIDTH</key_name>
- <key_value>256</key_value>
- </configuration>
- <configuration>
- <key_name>LISTING_IMAGE_HEIGHT</key_name>
- <key_value>190</key_value>
- </configuration>
- <configuration>
- <key_name>LISTING_IMAGE_WIDTH</key_name>
- <key_value>180</key_value>
- </configuration>
- <configuration>
- <key_name>MINI_IMAGE_HEIGHT</key_name>
- <key_value>30</key_value>
- </configuration>
- <configuration>
- <key_name>MINI_IMAGE_WIDTH</key_name>
- <key_value>30</key_value>
- </configuration>
- <configuration>
- <key_name>PREVIEW_IMAGE_HEIGHT</key_name>
- <key_value>30</key_value>
- </configuration>
- <configuration>
- <key_name>PREVIEW_IMAGE_WIDTH</key_name>
- <key_value>30</key_value>
- </configuration>
- <configuration>
- <key_name>SLIDER_IMAGE_HEIGHT</key_name>
- <key_value>90</key_value>
- </configuration>
- <configuration>
- <key_name>SLIDER_IMAGE_WIDTH</key_name>
- <key_value>90</key_value>
- </configuration>
- <configuration>
- <key_name>DEFAULT_TEMPLATE_THEME</key_name>
- <key_value>webstore-light</key_value>
- </configuration>
- <configuration>
- <key_name>PRODUCTS_PER_PAGE</key_name>
- <key_value>9</key_value>
- </configuration>
- </defaults>
-</config>
View
1 core/themes/brooklyn/css/custom.css
@@ -1 +0,0 @@
-
View
150 core/themes/brooklyn/css/dark.css
@@ -1,150 +0,0 @@
-
-
-/* Note to web designers:
-this layout is designed with the Twitter Bootstrap layout system.
-You should not hard-code point sizes for fonts, you should use em or percentages
-so it degrades gracefully on smaller screens. Use http://pxtoem.com/ for conversion.
-See base.css for base point sizes used.
-
-We recommend placing customizations in custom.css which overrides elements in this
-file, and leaving this file untouched.
-*/
-
-/**** Global settings ******/
-body { color: #97978a; background-color: #151514; background: url("images/darkbg.gif")}
-h1, h2, h3, h4, h5, h6 { color: #bcbcb5; }
-input, input:focus { color: #232323; background-color: #848478;; border: 10px solid #848478; }
-select, input[type="text"], input[type="password"], input[type="email"],input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus { color: #232323; background-color: #e5e5e5; border: 10px solid #e5e5e5; }
-legend { color: #a1a1a1; }
-a, a:visited { color: #97978A;}
-a:hover { color: #bcbcb5; }
-.darkbutton, .darkbutton a { background-color: #848478; color: white; }
-.lightbutton, .lightbutton a { background-color: #353534; color: white; }
-.smalldarkbutton { background-color: #848478; color: white; }
-.smalllightbutton { background-color: #353534; color: white; }
-.smalldarkbutton a, .smalllightbutton a { color: white; }
-
-/***** Login/Logout button *****/
-#login, #login a, #login a:visited { background-color: #353534; color: white; }
-
-/***** Navigation (Products dropdown) and tabs *****/
-#menubar { border-bottom: 0px; }
-.menuunderline:hover { border-bottom: 5px solid #bcbcb5;}
-
-#nav_products ul a { color: white; border-bottom: 1px dotted #cccccc;}
-#nav_products ul li ul li a { background: #2c2c2c; border-bottom: 1px dotted #cccccc; padding-bottom: 7px; }
-#nav_products ul li ul li a:hover { background: #2c2c2c; border-bottom: 1px dotted #cccccc; }
-
-
-
-/***** Breadcrumbs ******/
-.breadcrumbs { color: #bbbbbb; border-bottom: 1px dotted #aaaaaa;}
-.breadcrumbs a { color: #bbbbbb; }
-
-/***** Product Grid *****/
-.product_cell_graphic { background: white;}
-.product_cell_label { color: #ffffff; background: #262626;}
-.product_cell_label .product_cell_price_slash { color: #7f7f7f;}
-.product_cell a { color: #ffffff;}
-.product_cell_label a { color: #9c9c9c;}
-
-/***** Pagination *****/
-#pagination a {color: #888888; }
-#pagination li.page.selected, #pagination li.page.selected a {color: #C7C7C7; }
-#pagination li { color: #c7c7c7; }
-
-
-/***** Search Box *****/
-#searchentry { border-bottom: 4px solid #6A6A65; }
-#searchentry .search_box input { color: #aaaaaa; border: 0px; border-color: transparent; background-color: #10100f; }
-#searchentry .searchTextBox .searched { color: #151514; }
-
-/***** Mini Cart (right side shopping cart) *****/
-#shoppingcarttop .carticon { background: url(images/shoppingcartdark.png) no-repeat top right; }
-#shoppingcarttop .minicart_item { border-top: 1px dotted #bbbbbb; }
-#shoppingcarttop .emptymessage { color: #fff; }
-#shoppingcartbottom { border-top: 1px dotted #bbbbbb;}
-
- /* checkout button */
-#shoppingcartcheckout { background-color: #848478; color: white; }
-#shoppingcartcheckout .checkoutlink a { color: white; text-decoration: none;}
- /* edit cart button */
-#shoppingcarteditcart { background-color: #353534; color: white; }
-#shoppingcarteditcart .editlink a { color: white; }
- /* continue shopping button */
-#shoppingcartcontinue { background-color: #353534; color: white; }
-#shoppingcartcontinue .editlink a { color: white;}
-
-/**** Generic Cart is used both on checkout and on the Edit Cart screen ****/
-#genericcart .cartdecor { color: #aaaaaa; }
-/* when editing cart */
-#genericcart input[type="text"],#genericcart input[type="text"]:focus { background-color: white; border-bottom: 1px solid black; }
-
-.facebook_wall { border: 1px solid #e7e7e7; }
-/***** Sidebar Modules *****/
-#sidebar .clickbar { color: #ffffff; border: 1px dotted #999999; }
-
-/***** Product Details Page *****/
-#product_details h3 { color: #a1a1a1; }
-#product_details .price_reg { color: #555555;}
-
-#product_details .addcart {background-color: #848478; color: white; }
-#product_details .addcart a { color: white;}
-
-#product_details .wishlist { background-color: #353534; color: white;}
-#product_details .wishlist a { color: white; }
-
-#product_details .grid-view table.items tr.odd { background-color: white; }
-#product_details .grid-view table.items tr.even { background-color: white; }
-#product_details .targetarea { padding-top: 10px; }
-
-
-#product_details #photos legend { font-size: 0.7em;}
-/***** Checkout page and Registration Page *****/
-#checkout legend, #contact-form legend, #orderdisplay legend { color: #a1a1a1; }
-#checkout .warning, #checkout .errorMessage, #contact-form .warning, #contact-form .errorMessage { color: #dd0000; }
-#checkout input[type="text"], #checkout input[type="password"], #checkout input[type="email"], #checkout input[type="select"],#checkout input[type="text"]:focus,#checkout input[type="password"]:focus, #checkout input[type="email"]:focus, #checkout input[type="select"]:focus { border: 7px solid #E5E5E5; }
-#contact-form input[type="text"], #contact-form input[type="password"], #contact-form input[type="email"], #contact-form input[type="select"],#contact-form input[type="text"]:focus,#contact-form input[type="password"]:focus, #contact-form input[type="email"]:focus, #contact-form input[type="select"]:focus { border: 7px solid #E5E5E5; }
-#checkout .red,#contact-form .red, .customer_reg_err_msg { color: #dd0000; }
-#checkout fieldset { border-bottom: 2px dotted #e7e7e7; }
-
-#checkout #PromoLabel { color: #007700; }
-
-.forgotpassword { color: #ff0000; }
-
-
-/***** Messages from system *****/
-.msg { color: #252525; }
-
-/***** Order/SRO/Quote Display *****/
-#orderdisplay .cartlabel, #orderdisplay .label { background-color: white; color: black; }
-#orderdisplay input[type="text"],#genericcart input[type="text"]:focus { background-color: white;border-bottom: 1px solid black; }
-
-#orderdisplay fieldset { border-bottom: 2px dotted #e7e7e7; }
-
-/***** Order/SRO/Quote Display *****/
-#wishlistdisplay .rowborder { border-bottom: 1px dotted #aaaaaa;}
-
-#wishlistdisplay .link .disabled {color: #cccccc; background-color: #ffffff;}
-#wishlistdisplay .addcart { background-color: #262626; color: white; }
-#wishlistdisplay .addcart a { color: white;}
-#wishlistdisplay .sharelist { background-color: #7f7f7f; color: black; }
-#wishlistdisplay .sharelist a { color: white; }
-
-#wishlistdisplay .editwish a { color: white; text-transform: uppercase; font-size: 0.8em;}
-
-#btnWishListDelete { background-color: #ff9c59;}
-#wishlistdisplay .btnDelete { background-color: #ff9c59;}
-
-
-/***** Footy *****/
-#footer .addresshours { color: #353530; background-color: #848478;}
-#footer .copyright { color: #83837d; }
-#footer .bottomtabs a { color: #d0d0c7; }
-
-
-/****** jCarousel skin ******/
-.jcarousel-skin-slider .jcarousel-container{background:#FFFFFF;border:1px solid #706f73; }
-.jcarousel-skin-slider .jcarousel-item-placeholder{background:#fff;color:#000}
-
-
View
BIN core/themes/brooklyn/css/images/adv_search.png
Deleted file not rendered
View
BIN core/themes/brooklyn/css/images/arrow-down.png
Deleted file not rendered
View
BIN core/themes/brooklyn/css/images/arrow-right.gif
Deleted file not rendered
View
BIN core/themes/brooklyn/css/images/breadcrumbs_home.png
Deleted file not rendered
View
BIN core/themes/brooklyn/css/images/btn_add.png
Deleted file not rendered
View
BIN core/themes/brooklyn/css/images/btn_edit.png
Deleted file not rendered
View
BIN core/themes/brooklyn/css/images/btn_email.png
Deleted file not rendered
View
BIN core/themes/brooklyn/css/images/btn_remove.png
Deleted file not rendered
View
BIN core/themes/brooklyn/css/images/checkoutarrow.png
Deleted file not rendered
View
BIN core/themes/brooklyn/css/images/cross.png
Deleted file not rendered
View
BIN core/themes/brooklyn/css/images/darkbg.gif
Deleted file not rendered
View
BIN core/themes/brooklyn/css/images/email_footer_bg.png
Deleted file not rendered
View
BIN core/themes/brooklyn/css/images/email_header_bg.png
Deleted file not rendered
View
BIN core/themes/brooklyn/css/images/loginhead.png
Deleted file not rendered
View
BIN core/themes/brooklyn/css/images/next-horizontal.png
Deleted file not rendered
View
BIN core/themes/brooklyn/css/images/next-vertical.png
Deleted file not rendered
View
BIN core/themes/brooklyn/css/images/prev-horizontal.png
Deleted file not rendered
View
BIN core/themes/brooklyn/css/images/prev-vertical.png
Deleted file not rendered
View
BIN core/themes/brooklyn/css/images/scroll_left.png
Deleted file not rendered
View
BIN core/themes/brooklyn/css/images/scroll_right.png
Deleted file not rendered
View
BIN core/themes/brooklyn/css/images/shoppingcart.png
Deleted file not rendered
View
BIN core/themes/brooklyn/css/images/shoppingcartdark.png
Deleted file not rendered
View
BIN core/themes/brooklyn/css/images/shoppingcartlight.png
Deleted file not rendered
View
BIN core/themes/brooklyn/css/images/slash.png
Deleted file not rendered
View
BIN core/themes/brooklyn/css/images/spyglass.png
Diff not rendered.
View
145 core/themes/brooklyn/css/light.css
@@ -1,145 +0,0 @@
-
-
-/* Note to web designers:
-this layout is designed with the Twitter Bootstrap layout system.
-You should not hard-code point sizes for fonts, you should use em or percentages
-so it degrades gracefully on smaller screens. Use http://pxtoem.com/ for conversion.
-See base.css for base point sizes used.
-
-We recommend placing customizations in webstore-custom.css which overrides elements in this
-file, and leaving this file untouched.
-*/
-
-/**** Global settings ******/
-h1, h2, h3, h4, h5, h6 { color: #181818; }
-input, input:focus { color: #232323; background-color: #e5e5e5;; border: 10px solid #e5e5e5; }
-select, input[type="text"], input[type="password"], input[type="email"],input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus { color: #232323; background-color: #e5e5e5; border: 10px solid #e5e5e5; }
-legend { color: #a1a1a1; }
-a, a:visited { color: #000000;}
-a:hover { color: #000000; }
-.darkbutton, .darkbutton a { background-color: #262626; color: white; }
-.lightbutton, .lightbutton a { background-color: #7f7f7f; color: white; }
-.smalldarkbutton { background-color: #262626; color: white; }
-.smalllightbutton { background-color: #7f7f7f; color: white; }
-.smalldarkbutton a, .smalllightbutton a { color: white; }
-
-/***** Login/Logout button *****/
-#login, #login a { background-color: #262626; color: white; }
-
-/***** Navigation (Products dropdown) and tabs *****/
-#menubar { border-bottom: 1px dotted #aaaaaa; }
-.menuunderline:hover { border-bottom: 5px solid #000000;}
-
-#nav_products ul a { color: white; border-bottom: 1px dotted #cccccc;}
-#nav_products ul li ul li a { background: #2c2c2c; border-bottom: 1px dotted #cccccc; }
-#nav_products ul li ul li a:hover { background: #2c2c2c; border-bottom: 1px dotted #cccccc; }
-
-
-
-/***** Breadcrumbs ******/
-.breadcrumbs { color: #bbbbbb; border-bottom: 1px dotted #aaaaaa;}
-.breadcrumbs a { color: #bbbbbb; }
-
-/***** Product Grid *****/
-.product_cell { border: 1px #e4e0d8 solid; }
-.product_cell_label { color: #ffffff; background: #262626;}
-.product_cell_label .product_cell_price_slash { color: #7f7f7f;}
-.product_cell a { color: #ffffff;}
-.product_cell_label a { color: #9c9c9c;}
-
-/***** Pagination *****/
-#pagination a {color: #888888; }
-#pagination li.page.selected, #pagination li.page.selected a {color: black; }
-#pagination li { color: #c7c7c7; }
-
-
-/***** Search Box *****/
-#searchentry { border-bottom: 5px solid black; }
-#searchentry .search_box input { color: #aaaaaa; border: 0px; border-color: transparent; background-color: white; }
-#searchentry .searchTextBox .searched { color: #000000; }
-#
-/***** Mini Cart (right side shopping cart) *****/
-#shoppingcarttop .minicart_item { border-top: 1px dotted #bbbbbb; }
-#shoppingcarttop .emptymessage { color: #000; }
-#shoppingcartbottom { border-top: 1px dotted #bbbbbb;}
-
- /* checkout button */
-#shoppingcartcheckout { background-color: #262626; color: white; }
-#shoppingcartcheckout .checkoutlink a { color: white; text-decoration: none;}
- /* edit cart button */
-#shoppingcarteditcart { background-color: #7f7f7f; color: white; }
-#shoppingcarteditcart .editlink a { color: white; }
- /* continue shopping button */
-#shoppingcartcontinue { background-color: #7f7f7f; color: white; }
-#shoppingcartcontinue .editlink a { color: white;}
-
-/**** Generic Cart is used both on checkout and on the Edit Cart screen ****/
-#genericcart .cartdecor { color: #aaaaaa; }
-/* when editing cart */
-#genericcart input[type="text"],#genericcart input[type="text"]:focus { background-color: white; border-bottom: 1px solid black; }
-
-.facebook_wall { border: 1px solid #e7e7e7; }
-/***** Sidebar Modules *****/
-#sidebar .clickbar { color: #555555; border: 1px dotted #999999; }
-
-/***** Product Details Page *****/
-#product_details h3 { color: #a1a1a1; }
-#product_details .price_reg { color: #555555;}
-
-#product_details .addcart {background-color: #262626; color: white; }
-#product_details .addcart a { color: white;}
-
-#product_details .wishlist { background-color: #7f7f7f; color: white;}
-#product_details .wishlist a { color: white; }
-
-#product_details .grid-view table.items tr.odd { background-color: white; }
-#product_details .grid-view table.items tr.even { background-color: white; }
-
-
-#product_details #photos legend { font-size: 0.7em;}
-/***** Checkout page and Registration Page *****/
-#checkout legend, #contact-form legend, #orderdisplay legend { color: #a1a1a1; }
-#checkout .warning, #checkout .errorMessage, #contact-form .warning, #contact-form .errorMessage { color: #dd0000; }
-#checkout input[type="text"], #checkout input[type="password"], #checkout input[type="email"], #checkout input[type="select"],#checkout input[type="text"]:focus,#checkout input[type="password"]:focus, #checkout input[type="email"]:focus, #checkout input[type="select"]:focus { border: 7px solid #E5E5E5; }
-#contact-form input[type="text"], #contact-form input[type="password"], #contact-form input[type="email"], #contact-form input[type="select"],#contact-form input[type="text"]:focus,#contact-form input[type="password"]:focus, #contact-form input[type="email"]:focus, #contact-form input[type="select"]:focus { border: 7px solid #E5E5E5; }
-#checkout .red,#contact-form .red, .customer_reg_err_msg { color: #dd0000; }
-#checkout fieldset { border-bottom: 2px dotted #e7e7e7; }
-
-#checkout #PromoLabel { color: #007700; }
-
-.forgotpassword { color: #ff0000; }
-
-
-/***** Messages from system *****/
-.msg { color: #252525; }
-
-/***** Order/SRO/Quote Display *****/
-#orderdisplay .cartlabel, #orderdisplay .label { background-color: white; color: black; }
-#orderdisplay input[type="text"],#genericcart input[type="text"]:focus { background-color: white;border-bottom: 1px solid black; }
-
-#orderdisplay fieldset { border-bottom: 2px dotted #e7e7e7; }
-
-/***** Order/SRO/Quote Display *****/
-#wishlistdisplay .rowborder { border-bottom: 1px dotted #aaaaaa;}
-
-#wishlistdisplay .link .disabled {color: #cccccc; background-color: #ffffff;}
-#wishlistdisplay .addcart { background-color: #262626; color: white; }
-#wishlistdisplay .addcart a { color: white;}
-#wishlistdisplay .sharelist { background-color: #7f7f7f; color: black; }
-#wishlistdisplay .sharelist a { color: white; }
-
-#wishlistdisplay .editwish a { color: white; text-transform: uppercase; font-size: 0.8em;}
-
-#btnWishListDelete { background-color: #ff9c59;}
-#wishlistdisplay .btnDelete { background-color: #ff9c59;}
-
-
-/***** Footy *****/
-#footer .addresshours { background-color: #e9e9e9;}
-#footer .copyright { color: #b7b7b7; }
-
-/****** jCarousel skin ******/
-.jcarousel-skin-slider .jcarousel-container{background:#FFFFFF;border:1px solid #706f73; }
-.jcarousel-skin-slider .jcarousel-item-placeholder{background:#fff;color:#000}
-
-
View
404 core/themes/brooklyn/css/style.css
@@ -1,404 +0,0 @@
-
-
-/* Note to web designers:
-this layout is designed with the Twitter Bootstrap layout system.
-You should not hard-code point sizes for fonts, you should use em or percentages
-so it degrades gracefully on smaller screens. Use http://pxtoem.com/ for conversion.
-See base.css for base point sizes used.
-
-We recommend placing customizations in custom.css which overrides elements in this
-file, and leaving this file untouched. This file contains no coloring information, that's all in light.css and dark.css which can be
- chosen from Admin Panel->Themes . You can also selectively override anything using custom.css which is loaded last,
- or you can choose custom in Admin Panel->Themes to use that color file exclusively.
-*/
-
-/**** Global settings ******/
-#container { max-width: 960px; margin: auto;}
-body { font-family: "Proxima Nova", "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif; font-weight: normal; }
-h1, h2, h3, h4, h5, h6 {
- font-family: "Proxima Nova", "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-weight: normal;
-}
-b { font-weight: 700; }
-i { font-style: italic; }