Skip to content

Instantly share code, notes, and snippets.

@PlanetRoast
Created September 12, 2017 08:01
Show Gist options
  • Save PlanetRoast/1d050cce28be5746badee6c00ad70a22 to your computer and use it in GitHub Desktop.
Save PlanetRoast/1d050cce28be5746badee6c00ad70a22 to your computer and use it in GitHub Desktop.
For creating a Product model with all the columns needed for Affiliate Window product feeds.
# Rails Affiliate Window Scaffold
# --------------------------------------------------------------------------------------
# Purpose: For creating all the columns needed for Affiliate Window product feeds.
# Usage: Paste everything below into your terminal then rake db:migrate.
# Note: The backslashes allow the Linux terminal to run multi line commands.
rails g scaffold Product \
aw_deep_link:string \
product_name:string \
aw_product_id:bigint \
merchant_product_id:string \
merchant_image_url:string \
description:text \
merchant_category:string \
search_price:float \
merchant_name:string \
merchant_id:integer \
category_name:string \
category_id:integer \
aw_image_url:string \
currency:string \
store_price:float \
delivery_cost:float \
merchant_deep_link:string \
language:string \
last_updated:string \
display_price:string \
data_feed_id:integer \
brand_name:string \
brand_id:integer \
colour:string \
product_short_description:string \
specifications:string \
condition:string \
product_model:string \
model_number:string \
dimensions:string \
keywords:string \
promotional_text:string \
product_type:string \
commission_group:string \
merchant_product_category_path:string \
merchant_product_second_category:string \
merchant_product_third_category:string \
rrp_price:float \
saving:string \
savings_percent:string \
base_price:float \
base_price_amount:string \
base_price_text:string \
product_price_old:float \
delivery_restrictions:string \
delivery_weight:string \
warranty:string \
terms_of_contract:string \
delivery_time:string \
in_stock:boolean \
stock_quantity:integer \
valid_from:string \
valid_to:string \
is_for_sale:boolean \
web_offer:boolean \
pre_order:boolean \
stock_status:string \
size_stock_status:string \
size_stock_amount:string \
merchant_thumb_url:string \
large_image:string \
alternate_image:string \
aw_thumb_url:string \
alternate_image_two:string \
alternate_image_three:string \
alternate_image_four:string \
reviews:string \
average_rating:string \
rating:string \
number_available:integer \
custom_1:string \
custom_2:string \
custom_3:string \
custom_4:string \
custom_5:string \
custom_6:string \
custom_7:string \
custom_8:string \
custom_9:string \
ean:integer \
isbn:string \
upc:string \
mpn:string \
parent_product_id:integer \
product_GTIN:string \
basket_link:string \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment