| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Adding new property to a product (radio button) for Xcart 5 | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Hello
I found a great help in this link https://devs.x-cart.com/basics/adding_new_property_to_a_product/ so I can add extra properties to products. This implementation adds a text field in product page (Admin Area). I want to ask, If I would like to add a radio button what I should change in the code? Thanks
__________________
Xcart 4.x.x Xcart 5.x.x |
|||||||
#2
|
|||||||||
|
|||||||||
![]() Quote:
Hi there. I am assuming you are referring to a Yes/No button. If so, you should make the following change to the module. 1. View/FormModel/Product/Info.php Add the following line Code:
2. Model/Product.php Change from Code:
Code:
That's pretty much it. If you already have the demo module installed in your store, don't forget to drop the existing 'myMessage' column from the database before re-deploying. Otherwise it will most likely produce an error that data format is incorrect.
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful ![]() Click here to learn how to apply patches X-Cart Extensions |
|||||||||
#3
|
|||||||
|
|||||||
![]() Dear Alex,
thanks a lot!!!!!!!!! By the way these articles are a great help to understand Xcart 5!!!!!
__________________
Xcart 4.x.x Xcart 5.x.x |
|||||||
#4
|
|||||||||
|
|||||||||
![]() Quote:
Was glad to help ![]()
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful ![]() Click here to learn how to apply patches X-Cart Extensions |
|||||||||
#5
|
|||||||
|
|||||||
![]() I want to ask again, If I want to add a list menu (drop down) what I should do? I cannot find any article to read about.
__________________
Xcart 4.x.x Xcart 5.x.x |
|||||||
#6
|
|||||||||
|
|||||||||
![]() Quote:
I would suggest to find a module that does what you need in your X-Cart installation and then search through the code to find the piece of code that does the thing.
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful ![]() Click here to learn how to apply patches X-Cart Extensions |
|||||||||
#7
|
|||||||
|
|||||||
![]() Hi, following the same method as mentioned int he docs - https://devs.x-cart.com/basics/adding_new_property_to_a_product/ ; I added a new property to the product.
How can I now include that property to import and export of products?
__________________
Version 5.3.6.6 |
|||||||
#8
|
|||||||
|
|||||||
![]() You must extend the \XLite\Logic\Export\Step\Products to export and the \XLite\Logic\Import\Processor\Products to import you new property. For example to import:
Quote:
Quote:
__________________
Xcart 4.x.x Xcart 5.x.x |
|||||||
|
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|