osCommerce - Duplicating payment modules - oscommerce

I'm wondering on how to duplicate a payment module...bascially what I'm trying to do is to have 3 Cash on Delivery modules but with different names. How can I accomplish that? Haven't had any luck finding any answers so I posted this question here..
Kind regards

If anyone stumbles upon the same problem this is what I found out that works:
Copy the file from catalog/includes/modules/payment/ named cod.php. Replace every instance of the word 'cod' and 'COD' to anything else like 'cash' / 'CASH' for example.
Then upload the new file called 'cash.php'.
Next thing you have to edit two translates which can be found in catalog/includes/languages/english/modules/payment. Copy the cod.php file and replace the words like before.
Thats it

Related

Regex specific question and search function on my website dealing with broken links

I've been trying to figure out my regex pattern but it doesn't seem to be working for me.
Here's what i'm trying to do:
I have broken links on my website if someone accidentally gets to a page like so:
https://example.com/catalogsearch/result/?q=
or
https://example.com/catalogsearch/result/
So i'm redirecting them back to my homepage. The problem is now the search is just sending everything back to the homepage. So i'm assuming if there is something after the equals it needs to continue the search.. obviously
https://example.com/catalogsearch/result/?q=person
but currently i can't figure this out..
Here is my regex that i've been messing with for quite sometime now... still seems to be wrong or something else is wrong with my search.
"^/catalogsearch/result((/)|(/\\?)|(/\\?[a-z])|(/\\?[a-z]=))?$"
Please forgive me i'm horrible with regex.
After a lot of discussion, it is concluded that the routes.yaml will consider the url path as a valid route but not the query string part. Hence out of the two examples in the post, you can use
"/catalogsearch/result": { to: "https://example.com/", prefix: false }
and for other one please change it in nginx config to redirect to homepage or if its not possible then check with magento support on how to incorporate the query string part in routes.yaml file.

Open Cart decimal_point error on all price

I recent installed an OpenCart on server. I am facing an error (decimal_point) on all prices. Like up where cart shows (0 item(s) - $0decimal_point00) and bottom where product price is shown. I am new to OpenCart.
How can I solve this problem?
today I've solved this problem.
the
$_['decimal_point']= '.';
is displayed in
catalog/language/language_name/language_name.php
and
admin/language/language_name/language_name.php
but you should copy this line to
catalog/language/language_name/product/product.php
and everything will be ok
PS: language_name should be renamed to a correct name because at first I mistaken with french language pack and rename the folder to french but after I change it to frenc my store worked properly
Good Luck
Add the line
$_['decimal_point']= '.';
in catalog/language/language_name/common/cart.php
I solved this by updating language pack to latest version. It solve it completely.
So the reason is somewhere in language pack.
I went into admin --> Home/Languages and changed the directory value to match what was on the server in a case sensitive way.
On Windows it was working since it is case insensitive and Italian was with capital letter but when uploaded on Linux the case sensitiveness kicked in and this was shoung also strange timestamps.
I had this same problem and I solved it in a very simple and silly way, after trying everything I found on each page about it.
I was showing "decimal_point" in the prices, because the language I configured it as es-cr.php, but the file in Spanish is called es-es.php, by not agreeing, I gave that error, so I just changed the name to es-cr.php and everything works correctly.
I know this is an old thread, but if someone comes across it, the solution is to make sure you have the file [language_name]-[country].php in the following folders:
If the issue is in the admin side, the folder is: admin/language/[language_name]-[language_name] // ex.: for english, the folder is admin/language/en-gb, the filename is en-gb.php.
If the issue is in the store front, the folder is: catalog/language/[language_name]-[language_name] // ex.: for english, the folder is catalog/language/en-gb, the filename is en-gb.php.

Django giving user the ability to manage files/images

I need help understanding hot to go about giving my users the ability to upload and remove files in the same form.
Is there a demo some were i can find?
It seems a pretty redundant task but i cant find a documentation on that.
Not talking about admin.
Thanks.
Not sure what you mean by 'in the same form'. Do you want to upload a new file while marking a already uploaded file as to-be-deleted?
You could put a list of existing files as MultipleChoiceField underneath your FileField and delete whichever the user selected as part of your form processing.
There is also a whole lot of 3rd party packages which might suit your needs:
https://www.djangopackages.com/grids/g/file-managers/
Since I can't comment yet.
You probably want to solve it with ajax requests
[___newfile.txt___] [browse] [add] --POST--> /add
- File 1 [Trash] --GET--> /delete/1
- File 2 [Trash]
- File 3 [Trash]
- File 1 [Trash]
I've created a demo project to show how this works.
You can find it at https://github.com/trostik/djangoimagemanage
Hope it helps some one.
Cheers

Add line-break to open graph meta tag [duplicate]

This is an URL I have to send an invitation to an app of mine:
https://www.facebook.com/dialog/send?app_id=MY_APP_ID&
name=hola&
link=http://www.aWebSite.com&
picture=http://www.aWebSite.com/im01068442.jpg&description=participar!&
redirect_uri=http://elsuperdt.com
I'm trying to have a linebreak included within the description, but I just haven't found a way to do so. How do I do it?
I had the same issue and eventually gave up. Facebook seems to have gone to great lengths to avoid letting us have any linebreaks in the description.
The one thing you can do is add a &caption=first%20line which gets you one linebreak between the caption and the description. (There's a pretty short limit on how long the caption can be though - something like 80 characters.)
Update: this no longer works for send dialogs. It does still work for feed dialogs
Try using <center></center> this will create a new line in Facebook dialog description.
Try including %0D%0A in your description where you want the line break to be. This is the URL-encoded equivalent of a line break.
\n works in message but not in name parameter
I tried center></center> and %0D%0A. Both worked... for a split second. You could see the breaks upon page load, and then, like evil magic, facebook took it away and it was all scrunched up. Too bad. I'm trying to share a daily schedule, which would look much better with line breaks.
You can use blanks that are not posted to facebook in the length of the feed so the line breaks.
Or you just style your post by adding ".........." in the end of each line. This way people would maybe be more attracted to your post as they are eyecatching.

Please advice the folder structure for Handling multiple sites in Django

alt text http://www.freeimagehosting.net/image.php?387990357b.jpg
Please see the folder structure image in the above url mentioned please advice which structure would be best suited for better code managibility. If the above image is not gettign please use this url http://www.freeimagehosting.net/image.php?387990357b.jpg
As far as automated deployment goes, It would appear to me that your second option would be better... that will allow you to "pick up" either site 1 or site 2 all at once and drop it anywhere you want.
I use virtualenv to manage multiple sites, which is basically an extension of the second option: each with their own code base and settings file and modules.
this looks good: http://www.mail-archive.com/django-users#googlegroups.com/msg75840.html