| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
is it possible to override a module's yaml info | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
is it possible to override a module's yaml info
I have a client that wants to modify the "brands" module to say "designer". I've accomplished this almost everywhere, except that the menu item and the url (?target=brands) are set in the yaml file.
obviously i'm trying to accomplish this while maintaining upgradability. any direction would be appraciated.
__________________
SEEK HAPPINESS. EVERYTHING ELSE IS DETAILS. |
|||||||
#2
|
|||||||||
|
|||||||||
Re: is it possible to override a module's yaml info
Can you post a copy of the yaml? Are you talking about the admin side of customer side? I am sure that there is a way to do this in your own module. yaml files usually just insert data into the database, that is later referenced by a php file. We just have to find the file that references it, and decorate that class in our own module.
__________________
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. |
|||||||||
|
#3
|
|||||||
|
|||||||
Re: is it possible to override a module's yaml info
Quote:
Here's the part of the yaml I was thinking I'd override: XLite\Module\CDev\SimpleCMS\Model\Menu: - link: '?target=brands' type: P position: 150 translations: - code: en name: 'Brands' - code: ru name: 'Бренды' as you can see, it places the literal string there, so I wasn't sure how to modify that. Although, I'm thinking maybe I could use my own yaml and insert my own menu item and then remove theirs from the menu ( I think that's an option). however, that'd still leave '?target=brands' as a valid url that could get crawled, which might ding us for seo purposes. Ideally, I want to accomplish this without a bunch of manual steps in the backend, so it will be easily migratable to other stores. thanks for the reply.
__________________
SEEK HAPPINESS. EVERYTHING ELSE IS DETAILS. |
|||||||
#4
|
|||||||||
|
|||||||||
Re: is it possible to override a module's yaml info
Okay yes as you expect, this is just a menu item. The best way to fix this is just a simple edit of the menu. Then you can edit the language variable.
If it was your own module then this would be something to change, but since it a purchased one just make the change manually in the admin.
__________________
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. |
|||||||||
#5
|
|||||||
|
|||||||
Re: is it possible to override a module's yaml info
ok, so that didn't work like I was thinking
I got the menu saying what I want, but how do I make ?target=designers point to the brands page (where ?target=brands currently goes). Basically, how do I setup in a module what target goes where.
__________________
SEEK HAPPINESS. EVERYTHING ELSE IS DETAILS. |
|||||||
#6
|
|||||||||
|
|||||||||
Re: is it possible to override a module's yaml info
I'd search the module itself for the word brand and the word target. Then you will hopefully find the php file and method you need to decorate. I have several tutorials where I demonstrate these techniques.
__________________
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: is it possible to override a module's yaml info
But don't edit the module files directly, decorate them with your own custom module. Watch my tutorials and read/watch Tony's. Then if you still need help, we will be here.
__________________
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. |
|||||||||
#8
|
|||||||
|
|||||||
Re: is it possible to override a module's yaml info
Quote:
that's how I found the yaml file. it was the only place. I'm assuming this is an xcart thing more than a module thing, or its possible they're loading the info from a variable where it wouldn't show up in a content search. I'm still looking though. I guess, my question is, in the url when we get ?target=[somevalue], where in xcart controls what that does? because that url structure is not unique to this module. My Account goes to '?target=order_list'. So, where are targets defined, I guess?
__________________
SEEK HAPPINESS. EVERYTHING ELSE IS DETAILS. |
|||||||
#9
|
|||||||||
|
|||||||||
Re: is it possible to override a module's yaml info
I was able to get my hands on a copy of the Brands module.
In Module/QSL/ShopByBrand/View/Brand.php I see this method: Code:
this is the method I would override in my decorator. It may be other places, this is just the first I found.
__________________
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: is it possible to override a module's yaml info
Quote:
Ahhhh, thank you! I will try that shortly. I'm pretty sure that's what i need though. I saw this function early on in my search, but I hadn't figured out I was looking for targets yet.. its much more relevant now
__________________
SEEK HAPPINESS. EVERYTHING ELSE IS DETAILS. |
|||||||
|
|||
X-Cart forums © 2001-2020
|