forgeos_commerce 1.9.0
Sign up to get free protection for your applications and to get access to all the features.
- data/COPYING +339 -0
- data/COPYING.LESSER +165 -0
- data/Gemfile +2 -0
- data/LICENSE +2 -0
- data/MIT-LICENSE +20 -0
- data/README.textile +27 -0
- data/app/assets/images/forgeos/admin/favicon.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/association_product/bubble-quantity-products.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/association_product/check-checked.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/association_product/check-unchecked.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/association_product/context.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/association_product/create.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/association_product/dark-blue-minus.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/association_product/dark-blue-plus.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/association_product/dot.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/association_product/f.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/association_product/fminus.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/association_product/fminus_rtl.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/association_product/folder.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/association_product/fplus.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/association_product/fplus_rtl.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/association_product/lastli.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/association_product/lastli_rtl.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/association_product/li.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/association_product/remove.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/association_product/rename.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/association_product/throbber.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/bubble-quantity-products.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/check-checked.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/check-unchecked.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/context.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/create.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/dark-blue-minus.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/dark-blue-plus.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/dot.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/drag-drop.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/f.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/fminus.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/fminus_rtl.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/folder.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/fplus.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/fplus_rtl.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/grey-drag-drop.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/lastli.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/lastli_rtl.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/li.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/remove.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/rename.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/throbber.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/product_category/brown-minus.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/product_category/brown-plus.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/product_category/bubble-quantity-products.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/product_category/context.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/product_category/create.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/product_category/dot.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/product_category/f.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/product_category/fminus.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/product_category/fminus_rtl.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/product_category/fplus.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/product_category/fplus_rtl.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/product_category/lastli.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/product_category/lastli_rtl.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/product_category/li.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/product_category/remove.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/product_category/rename.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/product_category/throbber.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/zone-tree/bubble-quantity-products.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/zone-tree/check-checked.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/zone-tree/check-unchecked.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/zone-tree/context.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/zone-tree/create.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/zone-tree/dark-blue-minus.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/zone-tree/dark-blue-plus.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/zone-tree/dot.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/zone-tree/f.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/zone-tree/fminus.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/zone-tree/fminus_rtl.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/zone-tree/folder.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/zone-tree/fplus.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/zone-tree/fplus_rtl.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/zone-tree/lastli.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/zone-tree/lastli_rtl.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/zone-tree/li.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/zone-tree/remove.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/zone-tree/rename.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/zone-tree/throbber.gif +0 -0
- data/app/assets/javascripts/forgeos/admin/functions.js +3 -0
- data/app/assets/javascripts/forgeos/admin/functions/forgeos_commerce/all.js +1 -0
- data/app/assets/javascripts/forgeos/admin/functions/forgeos_commerce/attributes.js +18 -0
- data/app/assets/javascripts/forgeos/admin/functions/forgeos_commerce/cross-sellings.js +18 -0
- data/app/assets/javascripts/forgeos/admin/functions/forgeos_commerce/orders.js +88 -0
- data/app/assets/javascripts/forgeos/admin/functions/forgeos_commerce/products.js +46 -0
- data/app/assets/javascripts/forgeos/admin/functions/forgeos_commerce/rules.js +98 -0
- data/app/assets/javascripts/forgeos/admin/functions/forgeos_commerce/transporters.js +60 -0
- data/app/assets/javascripts/forgeos/admin/functions/forgeos_commerce/trees.js +35 -0
- data/app/assets/javascripts/forgeos/admin/functions/forgeos_commerce/uploads.js +10 -0
- data/app/assets/javascripts/forgeos/admin/inits.js +3 -0
- data/app/assets/javascripts/forgeos/admin/inits/forgeos_commerce/all.js +1 -0
- data/app/assets/javascripts/forgeos/admin/inits/forgeos_commerce/clicks.js +25 -0
- data/app/assets/javascripts/forgeos/admin/inits/forgeos_commerce/cross-sellings.js +69 -0
- data/app/assets/javascripts/forgeos/admin/inits/forgeos_commerce/customer.js +64 -0
- data/app/assets/javascripts/forgeos/admin/inits/forgeos_commerce/orders.js +83 -0
- data/app/assets/javascripts/forgeos/admin/inits/forgeos_commerce/overlays.js +45 -0
- data/app/assets/javascripts/forgeos/admin/inits/forgeos_commerce/products.js +103 -0
- data/app/assets/javascripts/forgeos/admin/inits/forgeos_commerce/settings.js +15 -0
- data/app/assets/javascripts/forgeos/admin/inits/forgeos_commerce/special-offers.js +23 -0
- data/app/assets/javascripts/forgeos/admin/inits/forgeos_commerce/trees.js +71 -0
- data/app/assets/stylesheets/forgeos/admin/base.css.sass +3 -0
- data/app/assets/stylesheets/forgeos/admin/forgeos_commerce/_all.css.sass +9 -0
- data/app/assets/stylesheets/forgeos/admin/forgeos_commerce/_attributes.css.sass +59 -0
- data/app/assets/stylesheets/forgeos/admin/forgeos_commerce/_customer.css.sass +84 -0
- data/app/assets/stylesheets/forgeos/admin/forgeos_commerce/_delivery.css.sass +81 -0
- data/app/assets/stylesheets/forgeos/admin/forgeos_commerce/_dropdowns.css.sass +171 -0
- data/app/assets/stylesheets/forgeos/admin/forgeos_commerce/_order.css.sass +208 -0
- data/app/assets/stylesheets/forgeos/admin/forgeos_commerce/_payment.css.sass +34 -0
- data/app/assets/stylesheets/forgeos/admin/forgeos_commerce/_products.css.sass +341 -0
- data/app/assets/stylesheets/forgeos/admin/forgeos_commerce/_special_offers.css.sass +198 -0
- data/app/assets/stylesheets/forgeos/admin/forgeos_commerce/_transporters.css.sass +5 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/association_product/style.css.sass +50 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/product-types/style.css.sass +129 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/product_category/style.css.sass +109 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/zone-tree/style.css.sass +103 -0
- data/app/controllers/addresses_controller.rb +51 -0
- data/app/controllers/admin/attributes_controller.rb +161 -0
- data/app/controllers/admin/base_controller.rb +5 -0
- data/app/controllers/admin/brands_controller.rb +119 -0
- data/app/controllers/admin/forms_controller.rb +66 -0
- data/app/controllers/admin/geo_zones_controller.rb +74 -0
- data/app/controllers/admin/import_controller.rb +50 -0
- data/app/controllers/admin/orders_controller.rb +248 -0
- data/app/controllers/admin/product_types_controller.rb +122 -0
- data/app/controllers/admin/products_controller.rb +204 -0
- data/app/controllers/admin/special_offers_controller.rb +236 -0
- data/app/controllers/admin/statistics_controller.rb +64 -0
- data/app/controllers/admin/transporter_rules_controller.rb +307 -0
- data/app/controllers/admin/users_controller.rb +100 -0
- data/app/controllers/admin/vouchers_controller.rb +207 -0
- data/app/controllers/application_controller.rb +75 -0
- data/app/controllers/order_controller.rb +229 -0
- data/app/helpers/admin/payment_fields_helper.rb +31 -0
- data/app/helpers/application_helper.rb +7 -0
- data/app/helpers/cart_helper.rb +40 -0
- data/app/helpers/category_helper.rb +36 -0
- data/app/helpers/product_helper.rb +118 -0
- data/app/helpers/routes_helper.rb +60 -0
- data/app/helpers/wishlist_helper.rb +142 -0
- data/app/models/address_delivery.rb +2 -0
- data/app/models/address_invoice.rb +2 -0
- data/app/models/attribute.rb +38 -0
- data/app/models/attribute_category.rb +3 -0
- data/app/models/attribute_value.rb +10 -0
- data/app/models/brand.rb +22 -0
- data/app/models/brand_category.rb +3 -0
- data/app/models/cart.rb +190 -0
- data/app/models/cart_item.rb +21 -0
- data/app/models/checkbox_attribute.rb +2 -0
- data/app/models/country.rb +4 -0
- data/app/models/cross_sellings_product.rb +4 -0
- data/app/models/currencies_exchanges_rate.rb +2 -0
- data/app/models/currency.rb +13 -0
- data/app/models/date_attribute.rb +2 -0
- data/app/models/dynamic_attribute.rb +6 -0
- data/app/models/dynamic_attribute_value.rb +5 -0
- data/app/models/form.rb +7 -0
- data/app/models/form_attribute.rb +3 -0
- data/app/models/geo_zone.rb +6 -0
- data/app/models/longtext_attribute.rb +2 -0
- data/app/models/number_attribute.rb +2 -0
- data/app/models/order.rb +483 -0
- data/app/models/order_detail.rb +129 -0
- data/app/models/order_shipping.rb +25 -0
- data/app/models/pack.rb +9 -0
- data/app/models/picklist_attribute.rb +2 -0
- data/app/models/product.rb +294 -0
- data/app/models/product_attribute.rb +4 -0
- data/app/models/product_category.rb +9 -0
- data/app/models/product_link.rb +9 -0
- data/app/models/product_price_variation.rb +3 -0
- data/app/models/product_sold_counter.rb +2 -0
- data/app/models/product_sweeper.rb +30 -0
- data/app/models/product_type.rb +27 -0
- data/app/models/product_type_category.rb +3 -0
- data/app/models/product_viewed_counter.rb +2 -0
- data/app/models/products_wishlist.rb +25 -0
- data/app/models/radio_attribute.rb +2 -0
- data/app/models/radiobutton_attribute.rb +2 -0
- data/app/models/setting.rb +46 -0
- data/app/models/size.rb +5 -0
- data/app/models/special_offer_category.rb +3 -0
- data/app/models/special_offer_rule.rb +21 -0
- data/app/models/text_attribute.rb +2 -0
- data/app/models/text_field_attribute.rb +2 -0
- data/app/models/transporter_category.rb +3 -0
- data/app/models/transporter_rule.rb +3 -0
- data/app/models/url_attribute.rb +2 -0
- data/app/models/user.rb +45 -0
- data/app/models/user_address.rb +6 -0
- data/app/models/voucher_category.rb +3 -0
- data/app/models/voucher_rule.rb +3 -0
- data/app/models/wishlist.rb +134 -0
- data/app/views/admin/addresses/_form.html.haml +42 -0
- data/app/views/admin/attributes/_categories.html.haml +7 -0
- data/app/views/admin/attributes/_choice.html.haml +24 -0
- data/app/views/admin/attributes/_date.html.haml +5 -0
- data/app/views/admin/attributes/_form.html.haml +36 -0
- data/app/views/admin/attributes/_longtext.html.haml +5 -0
- data/app/views/admin/attributes/_number.html.haml +5 -0
- data/app/views/admin/attributes/_tabs.html.haml +6 -0
- data/app/views/admin/attributes/_text.html.haml +5 -0
- data/app/views/admin/attributes/_url.html.haml +5 -0
- data/app/views/admin/attributes/destroy.js.erb +1 -0
- data/app/views/admin/attributes/edit.html.haml +2 -0
- data/app/views/admin/attributes/index.html.haml +33 -0
- data/app/views/admin/attributes/index.json.erb +24 -0
- data/app/views/admin/attributes/new.html.haml +2 -0
- data/app/views/admin/attributes/show.html.haml +51 -0
- data/app/views/admin/brands/_form.html.haml +29 -0
- data/app/views/admin/brands/_tabs.html.haml +6 -0
- data/app/views/admin/brands/destroy.js.erb +1 -0
- data/app/views/admin/brands/edit.html.haml +2 -0
- data/app/views/admin/brands/index.html.haml +15 -0
- data/app/views/admin/brands/index.json.erb +23 -0
- data/app/views/admin/brands/new.html.haml +2 -0
- data/app/views/admin/dashboard/index.html.haml +230 -0
- data/app/views/admin/forms/_form.html.haml +38 -0
- data/app/views/admin/forms/_tabs.html.haml +6 -0
- data/app/views/admin/forms/destroy.js.erb +1 -0
- data/app/views/admin/forms/edit.html.haml +2 -0
- data/app/views/admin/forms/index.html.haml +11 -0
- data/app/views/admin/forms/index.json.erb +20 -0
- data/app/views/admin/forms/new.html.haml +2 -0
- data/app/views/admin/geo_zones/_form.html.haml +20 -0
- data/app/views/admin/geo_zones/_list.html.haml +9 -0
- data/app/views/admin/geo_zones/edit.html.haml +3 -0
- data/app/views/admin/geo_zones/index.html.haml +49 -0
- data/app/views/admin/geo_zones/new.html.haml +3 -0
- data/app/views/admin/geo_zones/show.html.haml +4 -0
- data/app/views/admin/import/create_product.html.haml +2 -0
- data/app/views/admin/menus/_types_popups.html.haml +22 -0
- data/app/views/admin/orders/_address_form.html.haml +29 -0
- data/app/views/admin/orders/_form.html.haml +198 -0
- data/app/views/admin/orders/_list.html.haml +29 -0
- data/app/views/admin/orders/_products_popup.html.haml +15 -0
- data/app/views/admin/orders/create.html.haml +1 -0
- data/app/views/admin/orders/destroy.js.erb +1 -0
- data/app/views/admin/orders/edit.html.haml +1 -0
- data/app/views/admin/orders/index.html.haml +24 -0
- data/app/views/admin/orders/index.json.erb +48 -0
- data/app/views/admin/orders/show.html.haml +130 -0
- data/app/views/admin/product_types/_form.html.haml +46 -0
- data/app/views/admin/product_types/_list.html.haml +6 -0
- data/app/views/admin/product_types/_options_categories.html.haml +19 -0
- data/app/views/admin/product_types/_tabs.html.haml +6 -0
- data/app/views/admin/product_types/destroy.js.erb +1 -0
- data/app/views/admin/product_types/edit.html.haml +3 -0
- data/app/views/admin/product_types/index.html.haml +14 -0
- data/app/views/admin/product_types/index.json.erb +24 -0
- data/app/views/admin/product_types/new.html.haml +3 -0
- data/app/views/admin/product_types/show.html.haml +23 -0
- data/app/views/admin/products/_attributes.html.haml +37 -0
- data/app/views/admin/products/_cross_popup.html.haml +56 -0
- data/app/views/admin/products/_cross_sell_tr.html.haml +13 -0
- data/app/views/admin/products/_cross_sells.html.haml +1 -0
- data/app/views/admin/products/_form.html.haml +26 -0
- data/app/views/admin/products/_general.html.haml +153 -0
- data/app/views/admin/products/_list.html.haml +18 -0
- data/app/views/admin/products/_prices.html.haml +17 -0
- data/app/views/admin/products/_products_popup.html.haml +41 -0
- data/app/views/admin/products/_seo.html.haml +75 -0
- data/app/views/admin/products/_shippings.html.haml +0 -0
- data/app/views/admin/products/_sizes.html.haml +23 -0
- data/app/views/admin/products/_tabs.html.haml +2 -0
- data/app/views/admin/products/activate.js.erb +1 -0
- data/app/views/admin/products/destroy.js.erb +1 -0
- data/app/views/admin/products/edit.html.haml +1 -0
- data/app/views/admin/products/index.html.haml +20 -0
- data/app/views/admin/products/index.json.erb +65 -0
- data/app/views/admin/products/new.html.haml +1 -0
- data/app/views/admin/products/show.html.haml +158 -0
- data/app/views/admin/settings/_colissimo.html.haml +7 -0
- data/app/views/admin/settings/_godfather.html.haml +11 -0
- data/app/views/admin/settings/_google_shopping.html.haml +5 -0
- data/app/views/admin/settings/_payment.html.haml +63 -0
- data/app/views/admin/settings/_tabs.html.haml +5 -0
- data/app/views/admin/settings/edit.html.haml +33 -0
- data/app/views/admin/special_offers/_form.html.haml +88 -0
- data/app/views/admin/special_offers/_patterns.html.haml +151 -0
- data/app/views/admin/special_offers/_tabs.html.haml +5 -0
- data/app/views/admin/special_offers/_top_links.html.haml +6 -0
- data/app/views/admin/special_offers/activate.js.erb +1 -0
- data/app/views/admin/special_offers/destroy.js.erb +1 -0
- data/app/views/admin/special_offers/edit.html.haml +4 -0
- data/app/views/admin/special_offers/index.html.haml +15 -0
- data/app/views/admin/special_offers/index.json.erb +28 -0
- data/app/views/admin/special_offers/new.html.haml +2 -0
- data/app/views/admin/special_offers/show.html.haml +28 -0
- data/app/views/admin/special_offers/special_offer.html.haml +166 -0
- data/app/views/admin/statistics/index.html.haml +158 -0
- data/app/views/admin/transporter_rules/_delivery_rules.html.haml +83 -0
- data/app/views/admin/transporter_rules/_form.html.haml +90 -0
- data/app/views/admin/transporter_rules/_left_sidebar.html.haml +9 -0
- data/app/views/admin/transporter_rules/_sidebar.html.haml +10 -0
- data/app/views/admin/transporter_rules/_tabs.html.haml +8 -0
- data/app/views/admin/transporter_rules/activate.js.erb +1 -0
- data/app/views/admin/transporter_rules/destroy.js.erb +1 -0
- data/app/views/admin/transporter_rules/edit.html.haml +1 -0
- data/app/views/admin/transporter_rules/index.html.haml +13 -0
- data/app/views/admin/transporter_rules/index.json.erb +30 -0
- data/app/views/admin/transporter_rules/new.html.haml +1 -0
- data/app/views/admin/transporter_rules/show.html.haml +30 -0
- data/app/views/admin/users/_fields_for_addresses_deliveries.html.haml +38 -0
- data/app/views/admin/users/_fields_for_addresses_invoices.html.haml +34 -0
- data/app/views/admin/users/_form.html.haml +88 -0
- data/app/views/admin/users/edit.json.erb +35 -0
- data/app/views/admin/users/index.html.haml +12 -0
- data/app/views/admin/users/index.json.erb +32 -0
- data/app/views/admin/users/index2.html.haml +33 -0
- data/app/views/admin/users/show.html.haml +72 -0
- data/app/views/admin/vouchers/_form.html.haml +92 -0
- data/app/views/admin/vouchers/_tabs.html.haml +3 -0
- data/app/views/admin/vouchers/activate.js.erb +1 -0
- data/app/views/admin/vouchers/destroy.js.erb +1 -0
- data/app/views/admin/vouchers/index.html.haml +15 -0
- data/app/views/admin/vouchers/index.json.erb +28 -0
- data/app/views/admin/vouchers/new.html.haml +2 -0
- data/config/locales/activerecord/en.yml +6 -0
- data/config/locales/activerecord/fr.yml +18 -0
- data/config/locales/admin/address/en.yml +3 -0
- data/config/locales/admin/address/fr.yml +3 -0
- data/config/locales/admin/attribute/en.yml +76 -0
- data/config/locales/admin/attribute/fr.yml +75 -0
- data/config/locales/admin/brands/en.yml +24 -0
- data/config/locales/admin/brands/fr.yml +27 -0
- data/config/locales/admin/dashboard/en.yml +6 -0
- data/config/locales/admin/dashboard/fr.yml +6 -0
- data/config/locales/admin/order/en.yml +54 -0
- data/config/locales/admin/order/fr.yml +54 -0
- data/config/locales/admin/product/en.yml +105 -0
- data/config/locales/admin/product/fr.yml +106 -0
- data/config/locales/admin/settings/en.yml +90 -0
- data/config/locales/admin/settings/fr.yml +87 -0
- data/config/locales/admin/special_offer/en.yml +59 -0
- data/config/locales/admin/special_offer/fr.yml +60 -0
- data/config/locales/admin/transporter/en.yml +36 -0
- data/config/locales/admin/transporter/fr.yml +36 -0
- data/config/locales/admin/voucher/en.yml +3 -0
- data/config/locales/admin/voucher/fr.yml +3 -0
- data/config/locales/admin/wishlist/en.yml +89 -0
- data/config/locales/admin/wishlist/fr.yml +89 -0
- data/config/locales/common/en.yml +424 -0
- data/config/locales/common/fr.yml +422 -0
- data/config/routes.rb +109 -0
- data/config/search.example.yml +8 -0
- data/db/fixtures/currencies.yml +10 -0
- data/db/fixtures/currencies_exchanges_rates.yml +9 -0
- data/db/fixtures/page_translations.yml +11 -0
- data/db/fixtures/pages.yml +5 -0
- data/db/fixtures/people.yml +11 -0
- data/db/fixtures/product_type_translations.yml +11 -0
- data/db/fixtures/product_types.yml +2 -0
- data/db/migrate/20091009134433_create_attribute_values.rb +15 -0
- data/db/migrate/20091009134440_create_attribute_values_products.rb +14 -0
- data/db/migrate/20091009134448_create_attributes.rb +17 -0
- data/db/migrate/20091009134455_create_attributes_product_types.rb +14 -0
- data/db/migrate/20091009134525_create_carts.rb +15 -0
- data/db/migrate/20091009134532_create_cart_items.rb +14 -0
- data/db/migrate/20091009134609_create_cross_sellings_products.rb +11 -0
- data/db/migrate/20091009134616_create_currencies.rb +15 -0
- data/db/migrate/20091009134624_create_currencies_exchanges_rates.rb +13 -0
- data/db/migrate/20091009134631_create_dynamic_attribute_values.rb +17 -0
- data/db/migrate/20091009134659_create_order_details.rb +24 -0
- data/db/migrate/20091009134706_create_order_shippings.rb +16 -0
- data/db/migrate/20091009134714_create_orders.rb +21 -0
- data/db/migrate/20091009134721_create_packs_products.rb +13 -0
- data/db/migrate/20091009134805_create_product_types.rb +11 -0
- data/db/migrate/20091009134813_create_products.rb +37 -0
- data/db/migrate/20091009134821_create_products_wishlists.rb +13 -0
- data/db/migrate/20091009134947_create_wishlists.rb +12 -0
- data/db/migrate/20100323143123_create_geo_zones_transporter_rules.rb +12 -0
- data/db/migrate/20100414090950_create_brands.rb +15 -0
- data/db/migrate/20100414091706_create_sizes.rb +15 -0
- data/db/migrate/20100928123009_add_patronage_to_people.rb +20 -0
- data/db/migrate/20101007074306_create_product_price_variations.rb +13 -0
- data/db/migrate/20110311111210_create_forms.rb +13 -0
- data/db/migrate/20110311112646_attributes_forms.rb +13 -0
- data/db/migrate/20110322165950_add_payment_methods_to_settings.rb +13 -0
- data/db/migrate/20110405084454_add_colissimo_methods_to_settings.rb +13 -0
- data/db/migrate/20110516075553_add_google_infos_to_settings.rb +11 -0
- data/db/migrate/20110831164213_add_order_fields_to_addresses.rb +9 -0
- data/lib/CMCIC_Config.rb +16 -0
- data/lib/CMCIC_Tpe.rb +227 -0
- data/lib/forgeos/commerce.rb +9 -0
- data/lib/forgeos/commerce/admin_menu.rb +28 -0
- data/lib/forgeos/commerce/engine.rb +11 -0
- data/lib/forgeos/commerce/float.rb +10 -0
- data/lib/forgeos/commerce/statistics.rb +62 -0
- data/lib/forgeos/commerce/version.rb +5 -0
- data/lib/forgeos_commerce.rb +1 -0
- data/lib/special_offer.rb +61 -0
- data/lib/tasks/install.rake +9 -0
- data/lib/transporter.rb +26 -0
- data/lib/voucher.rb +41 -0
- data/recipes/deploy.rb +15 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +9 -0
- data/test/dummy/app/assets/stylesheets/application.css +7 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +42 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +27 -0
- data/test/dummy/config/environments/production.rb +51 -0
- data/test/dummy/config/environments/test.rb +39 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +10 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +58 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +26 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/forgeos_commerce_test.rb +7 -0
- data/test/test_helper.rb +10 -0
- metadata +539 -0
@@ -0,0 +1,60 @@
|
|
1
|
+
check_remove_icon_status('delivery-rule');
|
2
|
+
odd_even = 1;
|
3
|
+
|
4
|
+
function add_delivery_rule(name) {
|
5
|
+
var delivery_rule = jQuery('.' + name + '.pattern');
|
6
|
+
delivery_rules = jQuery('#delivery-rules');
|
7
|
+
|
8
|
+
new_rule = '<div id="item_'+ false_id +' " class="delivery-rule '+ (odd_even%2 == 0 ? '' : 'even') +'">';
|
9
|
+
new_rule += delivery_rule.html().replace(/undefined_id/g, false_id);
|
10
|
+
new_rule += '</div>';
|
11
|
+
|
12
|
+
delivery_rules.append(new_rule);
|
13
|
+
check_remove_icon_status('delivery-rule');
|
14
|
+
|
15
|
+
false_id--;
|
16
|
+
odd_even++;
|
17
|
+
}
|
18
|
+
|
19
|
+
function remove_delivery_rule(element){
|
20
|
+
rule_id = get_rails_element_id(jQuery(element).parent());
|
21
|
+
|
22
|
+
if (rule_id > 0) {
|
23
|
+
_delete = '<input type="hidden" id="shipping_methods_to_delete_" name="shipping_methods_to_delete[]" value="'+ rule_id +'" />'
|
24
|
+
jQuery('#delivery-rules').append(_delete);
|
25
|
+
}
|
26
|
+
|
27
|
+
jQuery(element).parent().remove();
|
28
|
+
check_remove_icon_status('delivery-rule');
|
29
|
+
}
|
30
|
+
|
31
|
+
|
32
|
+
function change_rule_for(element){
|
33
|
+
|
34
|
+
delivery_type = element.options[element.selectedIndex].value;
|
35
|
+
delivery_rules = jQuery('#delivery-rules');
|
36
|
+
|
37
|
+
delivery_rules.html('');
|
38
|
+
|
39
|
+
rule = '<div id="item_0" class="delivery-rule">'
|
40
|
+
rule += jQuery('.delivery-rule.'+ delivery_type +'.pattern').html().replace(/undefined_id/g, 0);
|
41
|
+
rule += '</div>';
|
42
|
+
|
43
|
+
delivery_rules.append(rule);
|
44
|
+
|
45
|
+
check_remove_icon_status('delivery-rule');
|
46
|
+
false_id = -1;
|
47
|
+
odd_even = 1;
|
48
|
+
|
49
|
+
}
|
50
|
+
|
51
|
+
function check_remove_icon_status(name){
|
52
|
+
var c = jQuery('#' + name + 's .' + name);
|
53
|
+
var icon = c.find('a.red-minus:first');
|
54
|
+
|
55
|
+
if (c.size() == 1) {
|
56
|
+
jQuery(icon).hide();
|
57
|
+
} else {
|
58
|
+
jQuery(icon).show();
|
59
|
+
}
|
60
|
+
}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
function init_transporter_tree(selector, type, source) {
|
2
|
+
jQuery(selector).bind('loaded.jstree', function(e, data){
|
3
|
+
jQuery(e.target).removeClass('tree-default').find('a').each(function(index,selector){
|
4
|
+
var category_id = get_rails_element_id(jQuery(selector).parent('li'));
|
5
|
+
jQuery(selector).droppable({
|
6
|
+
hoverClass: 'ui-state-hover',
|
7
|
+
drop:function(ev, ui){
|
8
|
+
jQuery.ajax({
|
9
|
+
data: {
|
10
|
+
"element_id": get_rails_element_id(jQuery(ui.draggable)),
|
11
|
+
"authenticity_token": encodeURIComponent(window._forgeos_js_vars.token)
|
12
|
+
},
|
13
|
+
success:function(request){jQuery.tree.focused().refresh();},
|
14
|
+
type:'post',
|
15
|
+
url:'/admin/geo_zones/' + category_id + '/add_element'
|
16
|
+
});
|
17
|
+
}
|
18
|
+
});
|
19
|
+
});
|
20
|
+
}).jstree({
|
21
|
+
"json_data":{
|
22
|
+
"ajax": {
|
23
|
+
"url": source
|
24
|
+
},
|
25
|
+
"progressive_render": true
|
26
|
+
},
|
27
|
+
"themes": {
|
28
|
+
"theme": 'categories'
|
29
|
+
},
|
30
|
+
"ui": {
|
31
|
+
"selected_parent_close": false
|
32
|
+
},
|
33
|
+
"plugins": ['themes', 'json_data', 'ui']
|
34
|
+
});
|
35
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
function add_picture_to_product(data){
|
2
|
+
var object_name = jQuery('form#wrap').data('object_name');
|
3
|
+
jQuery('#product-images ul.sortable li.clear').before('<li><a href="#" onclick="jQuery(this).parents(\'li\').remove(); check_product_first_image(); return false;" class="big-icons trash"></a><a href="/admin/pictures/' + data.id + '/edit" onclick ="window.open(this.href); return false;" class="big-icons edit" href="#"></a><input type="hidden" name="' + object_name + '[attachment_ids][]" value="' + data.id + '"/><img src="' + data.path + '" alt="' + data.name + '"/><div class="handler"><div class="inner"></div></div></li>');
|
4
|
+
check_product_first_image();
|
5
|
+
}
|
6
|
+
|
7
|
+
function add_attachment_to_product(data){
|
8
|
+
var object_name = jQuery('form#wrap').data('object_name');
|
9
|
+
jQuery('#product-files').append('<div class="block-container"><input type="hidden" name="' + object_name + '[attachment_ids][]" value="' + data.id + '" /><span class="block-type"><span class="handler"><span class="inner"> </span></span>' + data.type + '</span><span class="block-name">' + data.name + '<span class="file-size"> - ' + data.size + '</span></span><a href="/admin/' + data.type.toLowerCase() + 's/' + data.id + '/edit" onclick ="window.open(this.href); return false;" class="small-icons edit-link"></a><a href="#" class="big-icons gray-destroy"></a></div>');
|
10
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require_tree .
|
@@ -0,0 +1,25 @@
|
|
1
|
+
jQuery(document).ready(function(){
|
2
|
+
/*
|
3
|
+
*Add click function on .gray-destroy items
|
4
|
+
*Those items are links to remove their parents (i.e. blocks)
|
5
|
+
**/
|
6
|
+
jQuery('.red-delete-icon').live('click', function(e){
|
7
|
+
e.preventDefault();
|
8
|
+
var block = jQuery(this).parents(':first');
|
9
|
+
if (parseInt(get_rails_element_id(block.find('input:first'))) < 0) {
|
10
|
+
block.remove();
|
11
|
+
} else {
|
12
|
+
block.hide();
|
13
|
+
block.find('.delete').val(1);
|
14
|
+
}
|
15
|
+
return false;
|
16
|
+
});
|
17
|
+
|
18
|
+
jQuery('.gray-destroy-tattribute').live('click', function(e){
|
19
|
+
e.preventDefault();
|
20
|
+
jQuery(this).parents('li').remove();
|
21
|
+
return false;
|
22
|
+
});
|
23
|
+
|
24
|
+
jQuery('.add-link.choice,.block-container .green-add-icon').live('click', add_item_on_add_click);
|
25
|
+
});
|
@@ -0,0 +1,69 @@
|
|
1
|
+
jQuery(document).ready(function(){
|
2
|
+
jQuery('#cross-productSelectDialog').dialog({
|
3
|
+
autoOpen:false,
|
4
|
+
modal:true,
|
5
|
+
minHeight: 300,
|
6
|
+
width: 1080,
|
7
|
+
resizable:'se',
|
8
|
+
buttons: {
|
9
|
+
Ok: function(){
|
10
|
+
add_cross_to_product();
|
11
|
+
jQuery('#cross-productSelectDialog').dialog('close');
|
12
|
+
}
|
13
|
+
},
|
14
|
+
open: function(e,ui){
|
15
|
+
eval(jQuery('#table-products-cross').data('dataTables_init_function')+'()');
|
16
|
+
}
|
17
|
+
});
|
18
|
+
|
19
|
+
jQuery('#cross-product.look').click(function(e){
|
20
|
+
e.preventDefault();
|
21
|
+
jQuery('#cross-productSelectDialog').dialog('open');
|
22
|
+
return false;
|
23
|
+
});
|
24
|
+
|
25
|
+
jQuery('.delete_product_tr').live('click',function(e){
|
26
|
+
e.preventDefault();
|
27
|
+
jQuery(this).parents('tr').remove();
|
28
|
+
});
|
29
|
+
|
30
|
+
jQuery('#cross_tree').bind('select_node.jstree', function(e, data) {
|
31
|
+
var NODE = data.rslt.obj;
|
32
|
+
var cat_id = get_rails_element_id(NODE);
|
33
|
+
var current_table = jQuery('#table').dataTableInstance();
|
34
|
+
var url = current_table.fnSettings().sAjaxSource;
|
35
|
+
var url_base = url.split('?')[0];
|
36
|
+
var params;
|
37
|
+
var link = jQuery(NODE).find('a:first');
|
38
|
+
|
39
|
+
// update category id
|
40
|
+
|
41
|
+
params = get_json_params_from_url(url);
|
42
|
+
|
43
|
+
if (jQuery(link).hasClass('brand')){
|
44
|
+
params.type = 'brand';
|
45
|
+
ptype_id = jQuery(NODE).parents('ul').prev().attr('id');
|
46
|
+
params.ptype_id = ptype_id;
|
47
|
+
}else{
|
48
|
+
params.type = 'p_type';
|
49
|
+
}
|
50
|
+
|
51
|
+
params.category_id = jQuery(link).attr('id');
|
52
|
+
params = stringify_params_from_json(params);
|
53
|
+
|
54
|
+
// construct url and redraw table
|
55
|
+
update_current_dataTable_source('#table-products','/admin/products.json?' + params);
|
56
|
+
|
57
|
+
var object_name = jQuery(NODE).attr('id').split('_')[0];
|
58
|
+
var category_id = get_rails_element_id(NODE);
|
59
|
+
return true;
|
60
|
+
}).jstree({
|
61
|
+
"themes": {
|
62
|
+
"theme": 'categories',
|
63
|
+
},
|
64
|
+
"ui": {
|
65
|
+
"selected_parent_close": false
|
66
|
+
},
|
67
|
+
"plugins": ['themes', 'html_data', 'ui']
|
68
|
+
});
|
69
|
+
});
|
@@ -0,0 +1,64 @@
|
|
1
|
+
jQuery(document).ready(function(){
|
2
|
+
jQuery("input[name='same_as_delivery']:checked").live('click', function() {
|
3
|
+
if(jQuery(this).val() == 'true') {
|
4
|
+
|
5
|
+
var val_designation = jQuery('#user_address_deliveries_attributes_0_designation').val();
|
6
|
+
var val_name = jQuery('#user_address_deliveries_attributes_0_lastname').val();
|
7
|
+
var val_firstname = jQuery('#user_address_deliveries_attributes_0_firstname').val();
|
8
|
+
var val_address = jQuery('#user_address_deliveries_attributes_0_address').val();
|
9
|
+
var val_address_2 = jQuery('#user_address_deliveries_attributes_0_address_2').val();
|
10
|
+
var val_zip_code = jQuery('#user_address_deliveries_attributes_0_zip_code').val();
|
11
|
+
var val_city = jQuery('#user_address_deliveries_attributes_0_city').val();
|
12
|
+
var val_civility = jQuery('#user_address_deliveries_attributes_0_civility').val();
|
13
|
+
var val_country_id = jQuery('#user_address_deliveries_attributes_0_country_id').val();
|
14
|
+
|
15
|
+
jQuery('.invoice-address').hide('normal');
|
16
|
+
jQuery('#user_address_invoices_attributes_0_designation').val(val_designation);
|
17
|
+
jQuery('#user_address_invoices_attributes_0_lastname').val(val_name);
|
18
|
+
jQuery('#user_address_invoices_attributes_0_firstname').val(val_firstname);
|
19
|
+
jQuery('#user_address_invoices_attributes_0_address').val(val_address);
|
20
|
+
jQuery('#user_address_invoices_attributes_0_address_2').val(val_address_2);
|
21
|
+
jQuery('#user_address_invoices_attributes_0_zip_code').val(val_zip_code);
|
22
|
+
jQuery('#user_address_invoices_attributes_0_city').val(val_city);
|
23
|
+
|
24
|
+
// Custom Selects
|
25
|
+
jQuery('#user_address_invoices_attributes_0_civility').val(val_civility);
|
26
|
+
var civility_customer_select = jQuery('#user_address_deliveries_attributes_0_civility').siblings('.dropdown').find('.dropdown_toggle').html();
|
27
|
+
jQuery('#user_address_invoices_attributes_0_civility').siblings('.dropdown').find('.dropdown_toggle').html(civility_customer_select);
|
28
|
+
|
29
|
+
jQuery('#user_address_invoices_attributes_0_country_id').val(val_country_id);
|
30
|
+
var country_id_custom_select = jQuery('#user_address_deliveries_attributes_0_country_id').siblings('.dropdown').find('.dropdown_toggle').html();
|
31
|
+
jQuery('#user_address_invoices_attributes_0_country_id').siblings('.dropdown').find('.dropdown_toggle').html(country_id_custom_select);
|
32
|
+
|
33
|
+
} else {
|
34
|
+
jQuery('.invoice-address').show('normal');
|
35
|
+
}
|
36
|
+
});
|
37
|
+
jQuery('#same_people_infos').live('click', function() {
|
38
|
+
if(jQuery(this).is(':checked')) {
|
39
|
+
jQuery('.people_infos').hide('normal');
|
40
|
+
var val_name = jQuery('#user_lastname').val();
|
41
|
+
var val_firstname = jQuery('#user_firstname').val();
|
42
|
+
var val_civility = jQuery('#user_civility').val();
|
43
|
+
var custom_select_civility = jQuery('#user_civility').siblings('.dropdown').find('.dropdown_toggle').html();
|
44
|
+
|
45
|
+
jQuery('#user_address_deliveries_attributes_0_lastname').val(val_name);
|
46
|
+
jQuery('#user_address_deliveries_attributes_0_firstname').val(val_firstname);
|
47
|
+
jQuery('#user_address_deliveries_attributes_0_civility').val(val_civility);
|
48
|
+
jQuery('#user_address_deliveries_attributes_0_civility').siblings('.dropdown').find('.dropdown_toggle').html(custom_select_civility);
|
49
|
+
} else {
|
50
|
+
jQuery('#user_address_deliveries_attributes_0_lastname').val('');
|
51
|
+
jQuery('#user_address_deliveries_attributes_0_firstname').val('');
|
52
|
+
jQuery('#user_address_deliveries_attributes_0_civility').val('');
|
53
|
+
var civility_default_value = jQuery('#user_address_deliveries_attributes_0_civility').siblings('.dropdown').find('options ul li:first .value').text();
|
54
|
+
jQuery('#user_address_deliveries_attributes_0_civility').siblings('.dropdown').find('.dropdown_toggle').html('<span>'+civility_default_value+'</span>');
|
55
|
+
jQuery('.people_infos').show('normal');
|
56
|
+
}
|
57
|
+
});
|
58
|
+
jQuery('#user_password').change(function(){
|
59
|
+
jQuery('#user_password_confirmation').val(jQuery(this).val());
|
60
|
+
});
|
61
|
+
jQuery('#user_address_deliveries_attributes_0_country_id').change(function(){
|
62
|
+
jQuery('#user_country_id').val(jQuery(this).val());
|
63
|
+
});
|
64
|
+
});
|
@@ -0,0 +1,83 @@
|
|
1
|
+
jQuery(document).ready(function(){
|
2
|
+
jQuery('.add-order-detail').live('click',function(e){
|
3
|
+
e.preventDefault();
|
4
|
+
jQuery('#productSelectDialog').dialog('open');
|
5
|
+
return false;
|
6
|
+
});
|
7
|
+
|
8
|
+
jQuery('#productSelectDialog').dialog({
|
9
|
+
autoOpen:false,
|
10
|
+
modal:true,
|
11
|
+
minHeight: 380,
|
12
|
+
width: 800,
|
13
|
+
resizable:'se',
|
14
|
+
buttons: {
|
15
|
+
Ok: function(){
|
16
|
+
dataTableSelectRows('#table-products', function(current_table, indexes) {
|
17
|
+
for(var i=0; i<indexes.length; i++){
|
18
|
+
var row = current_table.fnGetData(indexes[i]);
|
19
|
+
var id = row.slice(-4,-3);
|
20
|
+
var name = row.slice(-3,-2)[0];
|
21
|
+
var sku = row.slice(-2,-1);
|
22
|
+
var price = row.slice(-1);
|
23
|
+
var price_with_currency = row.slice(3,4);
|
24
|
+
var img = jquery_obj_to_str(jQuery(row.slice(0, 1)[0]).find('img'));
|
25
|
+
|
26
|
+
add_product_to_order_detail(id, name, sku, price, price_with_currency, img);
|
27
|
+
}
|
28
|
+
jQuery('#transporter_rebuild').val(1);
|
29
|
+
update_order_total();
|
30
|
+
});
|
31
|
+
jQuery('#productSelectDialog').dialog('close');
|
32
|
+
}
|
33
|
+
},
|
34
|
+
open: function(e,ui){
|
35
|
+
eval(jQuery('#table-products').data('dataTables_init_function')+'()');
|
36
|
+
}
|
37
|
+
});
|
38
|
+
|
39
|
+
// update voucher value and hide/show
|
40
|
+
jQuery('#voucher').bind('change', function() {
|
41
|
+
|
42
|
+
// update display value and hidden field tag
|
43
|
+
jQuery('.voucher_value').html(jQuery(this).val());
|
44
|
+
jQuery('#order_voucher').val(jQuery(this).val());
|
45
|
+
|
46
|
+
// show/hide voucher value
|
47
|
+
if (jQuery(this).val() == '')
|
48
|
+
jQuery('.voucher').hide();
|
49
|
+
else
|
50
|
+
jQuery('.voucher').show();
|
51
|
+
update_order_total();
|
52
|
+
});
|
53
|
+
|
54
|
+
// update order shipping name and value
|
55
|
+
jQuery('#order_shipping').bind('change', function() {
|
56
|
+
var name = jQuery(this).find("OPTION:selected").text();
|
57
|
+
var price = jQuery(this).val();
|
58
|
+
|
59
|
+
if (price != ''){
|
60
|
+
jQuery('.order_shipping_name').html(name);
|
61
|
+
jQuery('#order_order_shipping_attributes_name').val(name);
|
62
|
+
jQuery('.order_shipping_price').html(price);
|
63
|
+
jQuery('#order_order_shipping_attributes_price').val(price);
|
64
|
+
update_order_total();
|
65
|
+
}
|
66
|
+
});
|
67
|
+
|
68
|
+
// update order status in index
|
69
|
+
jQuery('.order-change-status').live('change', function() {
|
70
|
+
var state = jQuery(this).val();
|
71
|
+
var order_id = get_rails_element_id(this);
|
72
|
+
jQuery.ajax({
|
73
|
+
"url": '/admin/orders/'+order_id,
|
74
|
+
"complete": display_notifications,
|
75
|
+
"data": {
|
76
|
+
"authenticity_token": encodeURIComponent(window._forgeos_js_vars.token),
|
77
|
+
"order[aasm_current_state_with_event_firing]": state
|
78
|
+
},
|
79
|
+
"dataType": 'text',
|
80
|
+
"type": 'put'
|
81
|
+
});
|
82
|
+
});
|
83
|
+
});
|
@@ -0,0 +1,45 @@
|
|
1
|
+
jQuery(document).ready(function(){
|
2
|
+
jQuery('#pack-productSelectDialog').dialog({
|
3
|
+
autoOpen:false,
|
4
|
+
modal:true,
|
5
|
+
minHeight: 300,
|
6
|
+
width: 1080,
|
7
|
+
resizable:'se',
|
8
|
+
buttons: {
|
9
|
+
Ok: function(){
|
10
|
+
add_products_to_pack();
|
11
|
+
jQuery('#pack-productSelectDialog').dialog('close');
|
12
|
+
}
|
13
|
+
},
|
14
|
+
open: function(e,ui){
|
15
|
+
eval(jQuery('#table-products').data('dataTables_init_function')+'()');
|
16
|
+
}
|
17
|
+
});
|
18
|
+
|
19
|
+
jQuery('#add-product').live('click',function(e){
|
20
|
+
e.preventDefault();
|
21
|
+
jQuery('#pack-productSelectDialog').dialog('open');
|
22
|
+
return false;
|
23
|
+
});
|
24
|
+
|
25
|
+
jQuery('#redirection-productSelectDialog').dialog({
|
26
|
+
autoOpen:false,
|
27
|
+
modal:true,
|
28
|
+
minHeight: 300,
|
29
|
+
width: 1080,
|
30
|
+
resizable:'se',
|
31
|
+
buttons: {
|
32
|
+
Ok: function(){
|
33
|
+
change_redirection_product();
|
34
|
+
jQuery('#redirection-productSelectDialog').dialog('close');
|
35
|
+
}
|
36
|
+
},
|
37
|
+
open: function(){ eval(jQuery('#table-redirections').data('dataTables_init_function')+'()');}
|
38
|
+
});
|
39
|
+
|
40
|
+
jQuery('#add-redirection-product').live('click',function(e){
|
41
|
+
e.preventDefault();
|
42
|
+
jQuery('#redirection-productSelectDialog').dialog('open');
|
43
|
+
return false;
|
44
|
+
});
|
45
|
+
});
|
@@ -0,0 +1,103 @@
|
|
1
|
+
jQuery(document).ready(function(){
|
2
|
+
//init sortable
|
3
|
+
jQuery('.sortable').each(function(){
|
4
|
+
jQuery(this).sortable({
|
5
|
+
"handle": '.handler',
|
6
|
+
"placeholder": 'ui-state-highlight',
|
7
|
+
"stop": function(event,ui){
|
8
|
+
jQuery('#product-images .sortable li').removeClass('first-image');
|
9
|
+
check_product_first_image();
|
10
|
+
}
|
11
|
+
});
|
12
|
+
});
|
13
|
+
|
14
|
+
//init the tool-tip (for product-modify page)
|
15
|
+
tool_tip();
|
16
|
+
|
17
|
+
//clone mySlides search input
|
18
|
+
jQuery('#product-filter').prepend(jQuery('#mySlides_filter').children('input').clone(true));
|
19
|
+
|
20
|
+
//The first image in product images list got the class first-image & become bigger
|
21
|
+
check_product_first_image();
|
22
|
+
|
23
|
+
//when click on add-product-link open the div below
|
24
|
+
jQuery('#add-product-link').bind('click', function(){
|
25
|
+
jQuery('#existing-products').toggleClass('open');
|
26
|
+
jQuery('#existing-products').toggle('blind');
|
27
|
+
});
|
28
|
+
|
29
|
+
jQuery('#product_product_type_id, #pack_product_type_id').live('change',function(e){
|
30
|
+
jQuery.ajax({
|
31
|
+
"before": function(){ tmce_unload_children('#product-types-panel');},
|
32
|
+
"data": {
|
33
|
+
"product_type_id": jQuery(e.target).val(),
|
34
|
+
"authenticity_token": window._forgeos_js_vars.token,
|
35
|
+
"id": get_id_from_rails_url()
|
36
|
+
},
|
37
|
+
"success": function(request){
|
38
|
+
jQuery('#product-types-panel').html(request);
|
39
|
+
tmce_load_children('#product-types-panel');
|
40
|
+
},
|
41
|
+
"type": 'post',
|
42
|
+
"url": '/admin/products/update_attributes_list'
|
43
|
+
});
|
44
|
+
});
|
45
|
+
|
46
|
+
jQuery('.add_a_size').live('click', function(){
|
47
|
+
var itemInTable = jQuery('#product_sizes tbody tr').length;
|
48
|
+
|
49
|
+
var new_tr = '';
|
50
|
+
new_tr += '<tr>'
|
51
|
+
new_tr += '<td>'
|
52
|
+
new_tr += '<input type="text" name="product[sizes_attributes]['+itemInTable+'][name]" />'
|
53
|
+
new_tr += '</td>'
|
54
|
+
new_tr += '<td>'
|
55
|
+
new_tr += '<input type="text" name="product[sizes_attributes]['+itemInTable+'][quantity]" />'
|
56
|
+
new_tr += '</td>'
|
57
|
+
new_tr += '<td>'
|
58
|
+
new_tr += '<input type="hidden" name="product[sizes_attributes]['+itemInTable+'][id]" />'
|
59
|
+
new_tr += '<input type="hidden" name="product[sizes_attributes]['+itemInTable+'][_destroy]" />'
|
60
|
+
new_tr += '<input type="hidden" name="product[sizes_attributes]['+itemInTable+'][position]" />'
|
61
|
+
new_tr += '<a href="#" class="remove_this_size">supprimer</a>'
|
62
|
+
new_tr += '</td>'
|
63
|
+
new_tr += '</tr>'
|
64
|
+
|
65
|
+
jQuery('#product_sizes').append(new_tr);
|
66
|
+
});
|
67
|
+
|
68
|
+
jQuery('#add-price-variation').live('click', function(e){
|
69
|
+
e.preventDefault();
|
70
|
+
var index = jQuery('#price-variations .line').size();
|
71
|
+
|
72
|
+
var new_price = "<div class='line'>\
|
73
|
+
<input class='center' type='text' size='2' name='product[price_variations_attributes]["+index+"][quantity]' />\
|
74
|
+
<label name='product[price_variations_attributes]["+index+"][quantity]' >"+jQuery('#price-variations').attr('data-quantity')+"</label>\
|
75
|
+
<input class='center' type='text' size='2' name='product[price_variations_attributes]["+index+"][discount]' />\
|
76
|
+
<label name='product[price_variations_attributes]["+index+"][discount]'>"+jQuery('#price-variations').attr('data-discount')+"</label>\
|
77
|
+
<a href='#' class='small-icons destroy-link destroy'></a>\
|
78
|
+
</div>";
|
79
|
+
|
80
|
+
jQuery('#price-variations').append(new_price);
|
81
|
+
return false;
|
82
|
+
});
|
83
|
+
|
84
|
+
jQuery('.remove_this_size').live('click', function(e){
|
85
|
+
e.preventDefault();
|
86
|
+
var block = jQuery(this).parents('tr');
|
87
|
+
if (parseInt(get_rails_element_id(block.find('input:first'))) < 0) {
|
88
|
+
block.remove();
|
89
|
+
} else {
|
90
|
+
block.hide();
|
91
|
+
block.find('.delete').val(1);
|
92
|
+
}
|
93
|
+
return false;
|
94
|
+
});
|
95
|
+
|
96
|
+
jQuery('#product_sizes tr').sortable({
|
97
|
+
handle:'.handler',
|
98
|
+
placeholder: 'ui-state-highlight'
|
99
|
+
});
|
100
|
+
|
101
|
+
jQuery('#product_sizes').dataTable();
|
102
|
+
|
103
|
+
});
|