| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Building a Request for Quote module | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
Building a Request for Quote module
Asking a question here, hoping to expand my understanding of XC5 and OOP, and reach out to the community for help. I am developing a "Request for Quote" module for a client.
The idea behind this module is to provide a way fr customers to request a custom quote for any product. The planned functionality is as follows: 1. New attribute RFQ added to the list of attributes, and can be assigned to any product. 2. The attribute functions similar to a textarea. 3. When attribute is assigned to a product, it displays at the below the default attributes on the product page. 4. The textarea is initially hidden, with only a checkbox and the attribute name showing, for example "Request for Quote" could be the display text. 5. When this checkbox is checked the default attributes are hidden, the textarea is revealed, and the previously selected default attribute values are copied into it. 6. Now the customer can continue specifying additional options that they want in the custom quote. 7. When the box is checked the price of the product should change to $0. 8. Once added to cart, the default attributes of the product should not display in the cart or minicart, only the RFQ attribute name, and the value taken from the RFQ textarea. 9. The customer should be able to proceed with checkout with the $0 item in their cart, and customer support personnel can follow up with the quote. I have completed steps 1-6, and still need to complete 7-9. Currently I am attempting to work on #8. I have a function that checks if the current product has an RFQ attribute assigned to it. Here is a portion of my class that does this: Code:
I have copied a class and a template into my module, creating: Code:
And I have created my template file: default/en/modules/Baby/RFQ/selected_attribute_values/body.tpl With just the same contents as the original so far: Code:
I am struggling with how to accomplish this. I would like to reuse the function so as not to recreate code. I also need a new function that checks if the attribute has value. Any and all solutions to the problem are welcome and much appreciated. I have sent Tony a copy of my module, anyone that wants a copy just PM me. I can't post it publicly because my client is considering selling it in the marketplace once complete.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
#2
|
|||||||||
|
|||||||||
Re: Building a Request for Quote module
The logic sounds too complex to me. Are you sure you need to base the RFQ logic on the Attributes feauture?
As for reusing the code: you can put the code as a public method into either a model class (something like $product->isRFQ(); ), or a new XLite\Module\Baby\RFQ\Core\... class.
__________________
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
|
|||||||||
|
|||||||||
Re: Building a Request for Quote module
Hi Mike!
Sorry, I cannot look into right now, because of upcoming webinar. I will get to it next week and will suggest a solution. Tony.
__________________
Found a bug in X-Cart? Post it to our bug tracker! Know how to make X-Cart better? Suggest an idea! |
|||||||||
|
#4
|
|||||||||
|
|||||||||
Re: Building a Request for Quote module
Hi Mike!
Thanks for your patience! Actually qualiteam is right. You need to make this method isRFQ() be available in the XLite/Model/OrderItem object, so you would be able to use it in the template similar to your default/en/modules/Baby/RFQ/selected_attribute_values/body.tpl or default skins/default/en/selected_attribute_values/body.tpl. Also, you can define your own methods that would display the value of RFQ textarea, so you may need to decorate XLite/Model/OrderItem class and add two more methods - isRFQ() - getRFQValue() Please, let me know if it makes sense and if it is any help for you. Surely, any more questions -- just let me know. Tony.
__________________
Found a bug in X-Cart? Post it to our bug tracker! Know how to make X-Cart better? Suggest an idea! |
|||||||||
#5
|
|||||||
|
|||||||
Re: Building a Request for Quote module
Mike, did you finish this module? I would be interested in taking a look at it for our site.
__________________
X-Cart 4.5.4 Gold (Live Business Site) X-Cart 5.1.9 Business (In Development Now) |
|||||||
|
#6
|
|||||||||
|
|||||||||
Re: Building a Request for Quote module
It is finished, and it works great. It should be released very soon. I am not releasing it, I developed it for another company that plans to sell it in the X-cart marketplace.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
|
#7
|
|||||||
|
|||||||
Re: Building a Request for Quote module
Ok, thanks for the quick answer Mike.
__________________
X-Cart 4.5.4 Gold (Live Business Site) X-Cart 5.1.9 Business (In Development Now) |
|||||||
#8
|
|||||||
|
|||||||
Re: Building a Request for Quote module
Hey Mike, Hal from NJ here..I think you'll remember me..
Do you know if this Mod was ever offered to the public yet? Thanks..
__________________
X-Cart 4.7 Using X-Cart for 6 years and loving it! |
|||||||
#9
|
|||||||||
|
|||||||||
Re: Building a Request for Quote module
Should be soon Hal. But it will be for Xcart 5. Good to hear from you man!
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
#10
|
|||||||
|
|||||||
Re: Building a Request for Quote module
Hi
i have a customer who would like a website that customers can add items to a basket , then request a quote . there must be no pricing on the website at this point ,(this will be for 6 months to test the market demand ) once they are happy with the demand they want to change to eCommerce , same items just now with pricing . i dont want to redo website from scratch each time +/- 2000 items does xcart have this avaliable sean
__________________
Free 5.3.6.0 |
|||||||
|
|||
X-Cart forums © 2001-2020
|