Commerce Module - Product not available

stephanie
Forums
Hello, First, sorry for my poor english. I am trying to create any courses and classes that people have to buy. However, I always have the "product not available" button instead of the "Add to cart" button. I created a student's profile. I have enabled the commerce module and the quota module. I created courses with an admin account. Then I added a price and a student's quota for each of them. In the demo website it works but not with my own installation. Can you explain me why it doesn't work for me? Thanks in advance
axel

Hello Stephanie,

Hello Stephanie, Have you checked "course" or "class" in the Commerce App settings, at this page, section "sellable items" ? /admin/apps/opigno/app/opigno_commerce_app/configure Did you get an error when installing the commerce App ?
stephanie

Hello axel,

Hello axel, Thanks for your answer. Yes, I have checked "course" and "class" in the Commerce App settings and I didn't get an error when installing the Commerce App. I don't understand. Do you have any idea ?
Profile picture for user James Aparicio
James Aparicio

Hi stephanie,

Hi stephanie, If you enable the product ui from the modules list, and then go to the products list, do you see a product for the given course? Best regards
stephanie

Hello James,

Hello James, Thanks for your answer. I have enabled the product ui from the module list and I do see a product for the given course. However, although I indicated a price for the given course, this price don't appear for the product in the product list. If I indicate a price for the product in the product list, the "Add to cart" button appear. So, How do I ensure that I just need to fill the price of the given course ?
Profile picture for user James Aparicio
James Aparicio

Hi stephanie,

Hi stephanie, If you enable the rules ui from the modules list and then go to Configuration -> Workflow -> Rules. Do you see any rule with text in red?
stephanie

Yes, I have this error :

Yes, I have this error : Error: action commerce_payment_enable_commerce_payment_example unknow.
Profile picture for user James Aparicio
James Aparicio

Hi stephanie,

Hi stephanie, What is the name of the rule that gives that error?
stephanie

The name of the rules is :

The name of the rules is : Example payment. The rules is in French and its content is this : "Exemple de paiement Nom système: commerce_payment_commerce_payment_example, Poids: 0 Étiquettes: Commerce Payment Erreur: action commerce_payment_enable_commerce_payment_example inconnu(e)." Thanks for your help !
Profile picture for user James Aparicio
James Aparicio

Hi stephanie,

Hi stephanie, This rule comes with the module "Payment Method Example". The opigno commerce app does not enable this module by default. The problem with that rule is that you enabled the module, and then disabled it i suppose, but you did not uninstall it (removing this rule). This is unrelated to your problem. Is this the only rule that has red text? Best regards
stephanie

Yes, this is the only rule

Yes, this is the only rule that has red text.
Profile picture for user James Aparicio
James Aparicio

Hi stephanie,

Hi stephanie, Can you please test this: Update a course node that you know has a price on the course and not in product. Create a new course with a price. Can you check if any of these products got the price assigned to them? Best regards.
stephanie

Yes, I updated a course node

Yes, I updated a course node that I know has a price on the course and not in product. I also created a new course with a price. For the new course, the "Add to cart" button appear :) But, it doesn't appear for the course that I have updated. But why ? I don't understand.
Profile picture for user James Aparicio
James Aparicio

Hi stephanie,

Hi stephanie, Can you tell me please what version of opigno did you install? Can you please tell me what version of the opigno commerce app are you using? You can see it inside the opigno_commerce_app.info file. Best regards
stephanie

Yes, I am using the version 7

Yes, I am using the version 7.x-1.2 of opigno commerce app and the version 1.7 of opigno.
Profile picture for user James Aparicio
James Aparicio

Hi stephanie,

Hi stephanie, I was not able to reproduce the bug that you are describing of the price of a product not being set. A product for a course is only created when you assign a price to the course. Regarding the price not being updated, we do not update the price of the product, we update the selling price to a client when adding to the cart and paying, loading the price that is on the node. In fact there is a small bug in one of the rules that is not being signaled. If you go to the rule "Calculate OG Product Price", in the conditions of that rule there is a component called "Line item is an OG Product". If you edit that component, you will find 3 conditions. If you edit the second one called "Entity is of bundle" under Entity Bundle value, please select ptoduct and save. This should fix your problem. Thank you for finding this bug and do not hesitate in contacting us if you have any other questions. I will patch the Opigno commerce app and create a new release today. Best regards
Profile picture for user James Aparicio
James Aparicio

https://drupal.org/node

https://drupal.org/node/2215335
stephanie

It's worked :) Thank you very

It's worked :) Thank you very much !