Forums

Covering OroCommerce, OroCRM, OroPlatform topics, including community updates and company announcements.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

Forum Replies Created

Viewing 15 replies - 1 through 15 (of 31 total)
  • Author
    Replies

  • peeush
    Participant

    Figured out the issue with my jsmodules.yml file; below is the updated version that builds fine, but I cannot still find my JS anywhere…

    Any ideas how to get my JS working in the theme?

    Thanks


    peeush
    Participant

    Thanks a ton for your help Andrey! As you suggested, changing the output configuration value in assets.yml file fixes the issue with asset build step and now my custom theme is getting compiled.

    Unfortunately though, looks like my JSModule file is not working now – this is what I had in my simple requirejs.yml file earlier:

    and this is what I changed it to in my new jsmodules.yml file:

    I realise that I need to add owlCarousel to shim section, but I was throwing errors during asset build step so took the following lines out:

    Can you please advise if I need to make any changes to my jsmodules.yml file and how do I compile these custom JS modules during the asset build process.

    Thanks


    peeush
    Participant

    Looking into this further, I see that all the import directives in the generated styles.css.scss file in /usr/share/nginx/html/oroapp/public/layout-build/tbazui/css/layout/tbazui folder have been prefixed with ./../../../ – for example:

    This seems to be incorrect as the import directives need to be prefixed with ./../../../../ (i.e. one more directory level up) to make them work – is this being caused by an incorrect webpack config? How can I get it fixed?

    Thanks!

    PS. I had it last working in 4.1.0-beta and not 4.1.0-rc1 as I mistakenly noted earlier.

    in reply to: Form type extensions – OroBlogPostExampleBundle? #40585

    peeush
    Participant

    Thanks for the update Andrey! I will check it out now.

    • This reply was modified 2 years, 10 months ago by  peeush.
    in reply to: Migration – Add column in Oro entity (not work) #40262

    peeush
    Participant

    Thanks Andrey – will check out scroll data events to add the new fields to the form.

    On location of the files for overriding templates – my install is using satis.oroinc.com for OroCommerce code:

    I am assuming that means I am on the latest development branch (version 4 or higher) and not the latest stable branch (3.1.11).

    I tried both the options noted in the article (copying to src/Resources and overriding the bundle) but neither worked as my install is on Symfony 4.2+ and the referenced article is for OroCommerce v3 (which I believe is on Symfony 3.4).

    Am I using the right/recommended file location for overriding templates?

    Thanks


    peeush
    Participant

    Thanks Andrey, but not sure what’s the “real” entity that I can use here – I used extendExtension->addEnumField() function in my migration class to add this custom field (named “Type” – with multi_select option set to true) and hence, don’t have a real entity class that I can use (or know what’s the right function to call).

    All’s good in the code above but for line #39-41 where I am not able to set the values for this enum field – any suggestions?

    Thanks

    in reply to: Migration – Add column in Oro entity (not work) #40238

    peeush
    Participant

    Hello – figured out that I also had to override update.html.twig and view-html.twig for OroCustomerBundle:Customer entity to get my custom fields to display on the application forms.

    Since file location for overriding templates has changed in symfony 3.4 (and onwards), I had to put my updated twig files in templates/bundles/OroCustomerBundle/Customer instead of <my bundle>Resources/OroCustomerBundle/Customer (or <my bundle>/Resources/views/Customer/

    I am now struggling with the code that I need to put in update.html.twig – below is what I have done:

    My custom field is still not showing up – can you please point me to what did I miss?

    Thanks

    in reply to: Migration – Add column in Oro entity (not work) #40225

    peeush
    Participant

    Hi Andrey

    I am having the same issue – my custom fields, created programmatically on Customer (and other entities) are not showing anywhere on the application forms despite setting ExtendScope::OWNER_CUSTOM. Below are the oro option values for one such field:

    What else do I need to do on the templates side etc. to make this field visible on Customer entity forms (CRUD, datagrid)?

    Thanks

    in reply to: Create CRUD pages for custom entities? #40172

    peeush
    Participant

    Thanks Andrey! Creating a simple CRUD article works, but for a couple of issues that needs to be fixed:

      in VehicleController class, viewAction return needs to include entity as well:
      public function viewAction(Vehicle $vehicle)
      {
      return array(
      ‘entity’=>$vehicle,
      ‘vehicle’=>$vehicle
      );
      }
      Delete action implementation details are missing – check out this cookbook for implementing it: https://makandracards.com/oro/65247-oroplatform-api-and-deleting-entity-and-api-testing
      In VehicleController class update function, to instantiate the Vehicle form, you need to explicitly pass the Form Type (passing alias does not work):
      $form = $this->get('form.factory')->create('InventoryBundle\Form\Type\VehicleType', $vehicle);
      FormType class needs to include OptionsResolver class and not OptionsResolverInterface class:
      use Symfony\Component\OptionsResolver\OptionsResolver;

    Hope this can help others using the article!

    in reply to: Form type extensions – OroBlogPostExampleBundle? #40171

    peeush
    Participant

    Thank you Andrey! I’ll wait to hear from you when the new version (and documentation) is available.


    peeush
    Participant

    Thanks Andrey! As you suggested, I will create the fields through code.

    Would you be able to please guide on my other open question about Form Type Extensions as the data for one of my custom entities needs to be input on Customer User entity form – and I am not sure how to implement the data provider class for it.

    Is there an example of sample code/sample bundle that I can look into to see how to implement new relation fields (one to many, many to one, many to many)?

    Thanks

    in reply to: Form type extensions – OroBlogPostExampleBundle? #40055

    peeush
    Participant

    Can someone from Oro team help please?

    Thanks

    in reply to: Adding custom order totals? #39977

    peeush
    Participant

    Hi Andrey – Can you please look at the code below and advise where I am going wrong or what have I missed?

    I have tried building a new bundle with the following folder structure:
    CustomBundle\CustomServiceFeeBundle.php
    CustomBundle\Provider\CustomServiceFeeProvider.php
    CustomBundle\Resources\config\services.yml
    CustomBundle\Resources\config\oro\bundles.yml

    Below are the files:
    services.yml

    CustomServiceFeeProvider.php

    CustomServiceFeeBundle.php and bundles.yml simply have new bundle definition.
    bundles.yml

    CustomServiceFeeBundle.php

    Unfortunately, this is not working – not sure where I am going wrong. Can you please have a look and advise?

    Thanks

    in reply to: Adding custom order totals? #39972

    peeush
    Participant

    Hello – I have the same requirement for adding a % of the order total as “processing fee” to each order. I have looked into Andrey’s suggested code files, but am struggling to set started on this.

    Not sure if Vincent managed to implement Andrey’s suggestions and get it working – can someone please share some sample code to apply a custom processing fee (as % of the order value) and I can use it to implement my design?

    Thanks

    in reply to: Product price display on dev environment? #39970

    peeush
    Participant

    Thanks Andrey! I still haven’t managed to solve the issue – below are my comments against your suggestions:

    – the consumer is not running
    My install struggles from messages consumers going into “not running” state from time to time (“supervisorctl status” returns FATAL: exited too early) – I haven’t been able to figure out why. How do I restart all consumers?

    All the other conditions are met – I have triggered the price recalculation manually, the product and pricing is using the same unit (each), I am only using pricing for 1 product and the pricelist has price specified for 1 product.

    The only issue I found (which I fixed immediately) was that earlier I was using the Default Price List – where currency was USD while my install currency is INR; I have now changed the currency to INR on the Default Price List, as well as created a completely new pricelist (in INR) and used it as well – the prices still don’t show up! Lastly, I have tried clearing the cache a number of times to ensure that’s not a problem.

    Please advise on how to get this resolved!

    Thanks

Viewing 15 replies - 1 through 15 (of 31 total)
Back to top

You will be redirected to [title]. Would you like to continue?

Yes No

You will be redirected to [title]. Would you like to continue?

Yes No