#81 ✓resolved
joep

couple of minor shop issues

Reported by joep | August 17th, 2010 @ 05:03 PM

  1. No price tag in the default feature on a shop detail page.

  2. Adding additional media in back end product page still fails for me. Looks like maybe I'm behind in a migration but my code and migrations appear to be up to date with the repo. Perhaps a migration hasn't been pushed?

Date: Tue, 17 Aug 2010 15:49:30 -0500
From: noreply@mytesting.com
Subject: New mytesting.com Issue #28: A ActiveRecord::UnknownAttributeError Exception occurred in catalog#edit
Mime-Version: 1.0
Content-Type: text/html; charset=utf-8

Issue #28 - reported

Reported By:

Administrative User

Location: cms:/website/shop/catalog/edit/3

Reported Type: auto

Reporting Domain: mytesting.com

Behavior


A ActiveRecord::UnknownAttributeError Exception occurred in catalog#edit

unknown attribute: caption
[RAILS_ROOT]/vendor/rails/activerecord/lib/active_record/base.rb:2744:in `attributes='

* URL: http://www.test.com:3000/website/shop/catalog/edit/3
* Parameters: {"commit"=>"Update Product", "action"=>"edit", "authenticity_token"=>"9pN4SWziIMOwSP+qQnsyFcfYWx0NJ9TTZwYy1/sg6Rs=", "add_feature"=>"", "features_order"=>"", "product"=>{"brand"=>"", "name"=>"Cras augue", "dimensions"=>"", "shippable"=>"1", "detailed_description"=>"", "weight"=>"", "image_file_id"=>"3", "url"=>"cras-augue", "price_values"=>{"USD"=>"10.0"}, "files_ids"=>"", "caption"=>{"3"=>"abc"}, "shop_shop_id"=>"1", "sku"=>"", "internal_sku"=>"", "images_ids"=>"3", "unit_quantity"=>"", "description"=>"Maecenas gravida leo vel lorem tincidunt vehicula. Vivamus aliquet consectetur erat nec tincidunt. Nullam euismod felis non augue vestibulum id interdum erat bibendum. Donec quam arcu, pretium in varius vel, porttitor id neque. Nunc non mi eu urna semper viverra. Integer a hendrerit magna. Quisque augue dui, sagittis ac venenatis in, tincidunt ut augue. Maecenas lobortis laoreet enim, consequat lacinia risus varius at. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Mauris id ligula nibh, et pellentesque ligula. Morbi in dictum ante. Nullam eros velit, viverra sit amet tristique in, sagittis et lectus. Vestibulum quis purus purus, at convallis libero.", "shop_product_class_id"=>"1", "in_stock"=>"1", "name_2"=>""}, "path"=>["3"], "controller"=>"shop/catalog", "options"=>{"6"=>{"image_id"=>"", "override"=>"0", "weight"=>"0.0", "image_list"=>"", "variation_type"=>"option", "option_sku"=>"", "prices"=>{"USD"=>"0.0"}, "in_stock"=>"1"}, "7"=>{"image_id"=>"", "override"=>"0", "weight"=>"0.0", "image_list"=>"", "variation_type"=>"option", "option_sku"=>"", "prices"=>{"USD"=>"0.0"}, "in_stock"=>"1"}, "8"=>{"image_id"=>"", "override"=>"0", "weight"=>"0.0", "image_list"=>"", "variation_type"=>"option", "option_sku"=>"", "prices"=>{"USD"=>"2.0"}, "in_stock"=>"1"}, "1"=>{"image_id"=>"", "override"=>"0", "weight"=>"0.0", "image_list"=>"", "variation_type"=>"option", "option_sku"=>"", "prices"=>{"USD"=>"0.0"}, "in_stock"=>"1"}, "2"=>{"image_id"=>"", "override"=>"0", "weight"=>"0.0", "image_list"=>"", "variation_type"=>"option", "option_sku"=>"", "prices"=>{"USD"=>"0.0"}, "in_stock"=>"1"}, "3"=>{"image_id"=>"", "override"=>"0", "weight"=>"0.0", "image_list"=>"", "variation_type"=>"option", "option_sku"=>"", "prices"=>{"USD"=>"1.0"}, "in_stock"=>"1"}, "4"=>{"image_id"=>"", "override"=>"0", "weight"=>"0.0", "image_list"=>"", "variation_type"=>"option", "option_sku"=>"", "prices"=>{"USD"=>"0.0"}, "in_stock"=>"1"}, "5"=>{"image_id"=>"", "override"=>"0", "weight"=>"0.0", "image_list"=>"", "variation_type"=>"option", "option_sku"=>"", "prices"=>{"USD"=>"0.0"}, "in_stock"=>"1"}}}
* Rails root: /Users/joe/src/Webiva
* User Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.1.11) Gecko/20100701 Firefox/3.5.11* Process: 10245
* Server : MacBook

[RAILS_ROOT]/vendor/rails/activerecord/lib/active_record/base.rb:2744:in `attributes='
[RAILS_ROOT]/vendor/rails/activerecord/lib/active_record/base.rb:2740:in `each'
[RAILS_ROOT]/vendor/rails/activerecord/lib/active_record/base.rb:2740:in `attributes='
[RAILS_ROOT]/vendor/modules/shop/app/controllers/shop/catalog_controller.rb:79:in `edit'
[RAILS_ROOT]/vendor/rails/actionpack/lib/action_controller/base.rb:1331:in `send'
[RAILS_ROOT]/vendor/rails/actionpack/lib/action_controller/base.rb:1331:in `perform_action_without_filters'
[RAILS_ROOT]/vendor/rails/actionpack/lib/action_controller/filters.rb:617:in `call_filters'
[RAILS_ROOT]/vendor/rails/actionpack/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark'
[RAILS_ROOT]/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'

Comments and changes to this ticket

  • Pascal Rettig

    Pascal Rettig August 18th, 2010 @ 07:16 PM

    • State changed from “new” to “resolved”

    Fixed w/ 0d394d3092278a29e62eb4e15baf31bf483a547f

  • Pascal Rettig

    Pascal Rettig August 18th, 2010 @ 07:20 PM

    For #1 - if a product has options, the price shows up in the options, if doesn't price shows up in the feature - is that not working for you?

  • joep

    joep August 18th, 2010 @ 09:14 PM

    Hi Pascal,

    No, doesn't work for me.

    With all the messing around I've been doing I thought maybe I accidentally changed something, so I rebuilt from scratch. Specifically, I made sure I was up to date with the code, then ran quick_install, then activated the modules, then ran the wizard for the shop. This created three products. When I go to the shop list page, I see the abbreviated list of three products---with prices. However, when I go to the details page for the product, the price does not show up.

    I have attached a picture of the list and of the detail page for the first item.

    Joe

  • joep

    joep August 18th, 2010 @ 09:34 PM

    Oh, and if a product has options, then the price DOES show up in the options correctly.

  • joep

    joep August 18th, 2010 @ 09:47 PM

    Well...I take the last comment back. It only works sometimes. If you create a product class with only one variation with price adjustments, then it seems to work correctly. If you have two or more variations with price adjustments, then it doesn't.

  • Pascal Rettig

    Pascal Rettig August 19th, 2010 @ 08:59 AM

    You're completely right - I was looking at products with classes, and the no_options tag incorrectly doesn't show the price if the product doesn't have a class, I fixed that but added an additional tag called 'show_price' that displays the price if the product has 0 variations or more than 1 variation.

    Here's the different situations:
    0 Variations = Show the price on the page
    1 Variation = Show the price in the drop down
    2+ variations = Show the price on the page and any modifications in the drop down

  • joep

    joep August 19th, 2010 @ 09:27 AM

    My preferred option would like to have the ability to choose through an attribute if, for 1 variation, it shows the total price or just the price modification. My thinking is that eventually I'll want to use a little javascript to update the price shown on the page as variations are chosen, but the look/feel will be inconsistent for products with only 1 variation.

    Joe

  • joep

    joep August 19th, 2010 @ 09:44 AM

    Oh, and reinstalling reminded me of something that I had forgotten. 'httparty' is required for the wizard, but the frozen gem is not in the repository (and it is not a required gem in environment.rb).

  • Pascal Rettig

    Pascal Rettig August 19th, 2010 @ 09:58 AM

    For the gems issue, what does rake gems tell you? Different modules can add in additional requirements besides what's in the core.

  • joep

    joep August 19th, 2010 @ 10:21 AM

    If I remove the 'config.gem httparty' from environment.rb that I added, then I get the following (and using the wizard raises an exception):

    rake gems
    (in /Users/joe/src/Webiva) - [I] mysql - [F] mime-types - [F] radius - [F] RedCloth - [F] BlueCloth - [F] gruff - [F] slave - [I] hpricot - [F] daemons - [F] maruku

    - [F] syntax >= 1.0.0
    
    • [F] net-ssh
    • [F] rmagick
    • [F] libxml-ruby
    • [F] soap4r
      • [F] httpclient >= 2.1.1
    • [I] json
    • [F] memcache-client
    • [I] activemerchant = 1.5.1
      • [R] activesupport >= 2.3.2
      • [F] builder >= 2.0.0

    I = Installed
    F = Frozen
    R = Framework (loaded before rails starts)

  • joep

    joep August 19th, 2010 @ 10:28 AM

    Shoot, really should to remember to preview:

    rake gems
    (in /Users/joe/src/Webiva)
     - [I] mysql 
     - [F] mime-types 
     - [F] radius 
     - [F] RedCloth 
     - [F] BlueCloth 
     - [F] gruff 
     - [F] slave 
     - [I] hpricot 
     - [F] daemons 
     - [F] maruku 
        - [F] syntax >= 1.0.0
     - [F] net-ssh 
     - [F] rmagick 
     - [F] libxml-ruby 
     - [F] soap4r 
        - [F] httpclient >= 2.1.1
     - [I] json 
     - [F] memcache-client 
     - [I] activemerchant = 1.5.1
        - [R] activesupport >= 2.3.2
        - [F] builder >= 2.0.0
    
    I = Installed
    F = Frozen
    R = Framework (loaded before rails starts)
    
  • Pascal Rettig

    Pascal Rettig August 19th, 2010 @ 12:14 PM

    I added a new ticket for this [#83] - can you update there

    Do you have the file that's triggering the require?

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Shared Ticket Bins

People watching this ticket

Attachments

Pages