What are the Slack Archives?
Itβs a history of our time together in the Slack Community! Thereβs a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you wonβt be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
Hello Techies , Can anyone share spryker command for module create or extend it ?
Hello Techies , Can anyone share spryker command for module create or extend it ?
Comments
-
You can use the new SDK: https://docs.spryker.com/docs/sdk/dev/spryker-sdk.html#getting-started
spryker-sdk list
will show you all available commands and I'm sure there is one to create a new module (spryker-sdk generate:php:add-module
)0 -
Superb @UL6DGRULR
0 -
@UL6DGRULR One more help needed. I want to add custom attributes(Attribute 1 , Attribute 2) to product by creating new table product_custom_attribute that should associate with product display in front end and back end. How can i do this?
0 -
Please have a read before on product attributes in the documentation.
There is a difference between attributes (something that is used for displaying or is optional) and properties of a product (something that has a meaning and some part of the code is relying on).For attributes you do not need to create a new field or even a new table. Those are saved in
spy_product_abstract.attributes
(orspy_product.attributes
for concretes/articles), respectively in their_localized
euqivalent if they should be translatable.
See https://docs.spryker.com/docs/scos/user/back-office-user-guides/202005.0/catalog/attributes/creating-product-attributes.html for an intro into product attributes.If you do want to have a separate DB field, for example because your code relies on the fact that this field is always present, you do not need to create a new table. By creating a new table you will decrease the performance, as per default propel does not fetch relations, but only when they are needed. This means that
$productEntity->getPyzCustomAttribute()->getAttribute1()
will cause two DB queries.
Instead you can add columns to existing tables in Spryker: https://docs.spryker.com/docs/scos/dev/back-end-development/zed/persistence-layer/database-schema-definition.html0 -
ok Thanks
0 -
@UL6DGRULR It is very useful
0 -
@UL6DGRULR How can we add new fields for account profile and Order Details?
0 -
Account = spy_customer:
Add
src/Pyz/Zed/Customer/Persistence/Propel/Schema/spy_customer.schema.xml
with<?xml version="1.0"?> <database xmlns="spryker:schema-01" xmlns:xsi="<http://www.w3.org/2001/XMLSchema-instance>" name="zed" xsi:schemaLocation="spryker:schema-01 <https://static.spryker.com/schema-01.xsd>" namespace="Orm\Zed\Customer\Persistence" package="src.Orm.Zed.Customer.Persistence"> <table name="spy_customer"> <column name="your_column" type="COLUMN TYPE" /> </table> </database>
and run
console propel:install
to create the field in the DB and in the entity.This is all part of the bootcamp (https://academy.spryker.com/learn/course/external/view/elearning/89/developer-bootcamp) if you haven't already gone through I would strongly advice you to do so.
0 -
Order Details = spy_sales_order
0 -
Ok Thanks
0 -
We are facing this issue when run console propel:install command. After creating Schema for extend customer table..
0 -
@UL6DGRULR If i want to add two field - One String Value , Second - hashmap then can we do it?
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 76 Spryker News
- 930 Developer Corner
- 788 Spryker Development
- 89 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 26 Job Opportunities
- 3.2K π Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 33 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random