I would like to create template for the different clients my society had, like :
/support/index-client1 AND /support/index-client2 ...
So i clone index.php then the files that required : header.inc.php , client.inc.php but i have a blank page , and i cant figure why.
I dont know if i'm doing right , i want to load different design per client, so i would like to create x index with their own design ( so it own theme.css )
Any ideas ?
Related
I am new with Yeoman generator and manage to create a generator that generates a project from a template. However, my template folder contains directories and is it possible to rename the directory based on certain input or template pattern just like the file content ?
Following are my template directories.
dc_compid_sid
- db
- tool_compid_sid
- js_compid_sid
I would like to rename compid and sid when copy is done with the input values.
Following is my write code.
this.fs.copyTpl(
this.templatePath(),
this.destinationPath(),
{
compid : this.answers.compid,
sid : this.answers.sid
}
);
I read the documentation in Yeoman, mem-fs that allows copy options that eludes, this is possible with arguments passing in. However, I am new in nodejs/javascript coding and there is not many examples that I can rely on.
Hope somebody can help and guide.
Thanks.
Anand Muthu
We've been using two shared websites for some time. I've used the subdirectory method as indicated here (https://www.crucialhosting.com/knowledgebase/setup-multiple-magento-stores). So both websites have a shared admin panel and share the file system.
But we want the possibility to make some changes for the second site compared to the first. The second website is for our physical store so we could decide to not allowe customers to place an order, but only show which products we have in the physical store and the actual stock levels.
I would do that by making changes in app/code or app/design, etc. But because both sites share the same files, I can't regularly change a file without making a change to both websites.
So the question is:
Do I need to setup the two sites in a different way, or is there a way to make changes in some files to differentiate results depending on the site the customer is seeing? If site = 2 then do not show the shopping cart, etc.
We're using Magento 1.7.
There are multiple ways of providing dynamic content/features in Magento based on website.
Below are two easy ways to implement conditional content by store.
The first is to leverage the theme folders per site.
Navigate to app/design/frontend/theme/yourpackage/yourtheme/
Duplicate this folder twice:
app/design/frontend/theme/yourpackage/store1/
app/design/frontend/theme/yourpackage/store2/
Navigate to admin panel: admin/system_config/edit/section/design/
Change Current Configuration Scope to store1 and set all of theme options to point to your newly created theme store1/store2.
Now both websites will use their own template & layout files which you can customize without them interfering with each other.
The second option is simpler but long term may not be the best
solution.
Go to where you want to add a store conditional and drop in this if statement:
if( strtolower( Mage::app()->getStore()->getCode() ) === 'store1' )
{
}
else if( strtolower( Mage::app()->getStore()->getCode() ) === 'store2' )
{
}
I want to create an import from a CSV but i can't modify the CSV file.
So i need to define default values for a couple required fields in Magento (like "type" ( > Simple Product ) etc.
I'm looking at https://stackoverflow.com/a/7319214/2252078 to make a custom Adapter and that inject the missing required values in the array before saving.
But i already get an error that says:
Method "parse" not defined in adapter spaanproductions_basics/convert_adapter_product
So i can't even begin with my custom code.
Maybe someone has a beter idea how to create some default values, or how to fix this issue.
Magento version: 1.9.1.1
Thanks in advance.
Kind regards,
Sonny
Not sure what the problem is, your code does seem to be valid. You could try http://pastebin.com/vxewc0Zt . OR temporarily rename your app/code/local/Spaanproductions/Basics/Model/Covert/Adapter/Product.php to verify wetter the right class is actually being loaded although I highly doubt that's the problem
-- Edit (See comments) --
try changing spaanproductions_basics/convert_adapter_product to basics/convert_adapter_product your models are defined under basics, not under spaanproductions"
At the first you have to export products as a csv file to catch the structure and then modify that as you need.
Take a look at this answer, it could be useful:
Update Magento products with multiple images
I'm trying to fix a few product's URLs and I've been doing the following process:
I run this on the database: delete from core_url_rewrite;
On the CMS I go to system > index management > GATALOG URL REWRITES and ask to rewrite it;
And then when I go on the CMS to Catalog > Url Rewrite Management and search for the products, on the column Request Path I get a lot of match-not-found-XXX , where XXX are different numbers.
It is happening with many products and I've done and redone the process above and still getting the same resuls.
I can't figure why it is happening. Any clue?
Magento usually adds the number 'XXX' to the url-path if another product already has the same path. Is there any chance that you imported those products and something gone wrong there?
Check the urk_key values for all those products and see what they are set too.
That's about the best clue I have right now, good luck!
Currently I am facing the following problem:
A website, which I have to make for a company, has different locations. But the content of a few pages is for all locations the same. Now I have created a global folder with the items for all the locations. But now I am facing the following problem: when accessing the global items from the website of a specific location I get the global url. But what I want is that the specific location url remains the same structure, for example:
Now it is www.url.com/global/subfolder/itemname
And what I want is www.url.com/location1/subfolder/itemname
Does anybody have any solution(s)/suggestion(s) for this problem?
Does anybody also have a solution for creating a menu to insert these global items but also to insert the location specific items?
Some more information about my Sitecore content structure
Global: contains the global items for alle locations
Corporate: the corporate website of the company
Location1: the website of location1
Location2: the website of location2
Adam Weber was right, cloning is your best solution:
Create your Global section, with all the child items you need
For each of your local sections, clone the global section and place it where you'd like it to appear within your local menu
If I understand you correctly, this is what I'd do. It might not be the prettiest solution. But it'll work.
You have your "data" items in /global/subfolder/itemname
then just create some templates, which are "dummy" pages, that only contain a link to the global item (and perhaps the few fields that could differ (perhaps contact email for the specifik location).
Then you make a sublayout that bascially jsut gets the referenced item and uses that instead of Sitecore.Context.Item.
Then create an instance of the "dummy" template in /location1/subfolder/itemname and reference it to /global/subfolder/itemname
That way you URLs will be correct and the data will be the same.
Another and probably smarter solution (if you have enabled proxies) is to create a proxy that takes
/global/subfolder/itemname as source and points to /location1/subfolder/ as target (or you could take /global/subfolder and check "include children".
Here is a Guide on how to use proxies in 5.3:
http://sdn.sitecore.net/Articles/Administration/Using%20Proxy%20Items%20in%205,-d-,3.aspx