Welcome, Guest. Please login or register.
August 20, 2008, 05:25:35 PM

Login with username, password and session length
Search:     Advanced search
Website Baker 2.7.0 (stable) released!
For more information look here.
The announcement board can be found here.
60556 Posts in 9791 Topics by 5824 Members
Latest Member: blubb
* Home Help Search Login Register
+  Website Baker Community Forum
|-+  English
| |-+  Modules
| | |-+  GoCart - Added shipping
Pages: [1] 2 Go Down Print
Author Topic: GoCart - Added shipping  (Read 6067 times)
tomhung
Master Baker
*****
Offline Offline

Posts: 354


cave_crickett@hotmail.com cave+crickett gbosen
Email
« on: November 29, 2006, 09:39:19 PM »

I modified gocart 1.6.2 to add shipping charges.

Here is the new module let me know if you have problems.  Mine works fine.

http://zephren.shinola.org/pages/purchase.php

*Testing on other systems will prob need to take place to confirm stability.
Logged
kweitzel
Forum Team
A Baker's Baker
*****
Online Online

Posts: 4214


WWW
« Reply #1 on: November 30, 2006, 08:42:36 AM »

Does look good, on XAMPP no issues. Any chance you make the Currency changable via drop-down with function to add custom currency?

cheers

Klaus

Logged

ruebenwurzel
Leaders Team
A Baker's Baker
*****
Offline Offline

Posts: 6255


Keep on Rockin


WWW Email
« Reply #2 on: November 30, 2006, 12:08:19 PM »

Hello,

done a short look think there needs to be a little more tweaking on this modul. Especially:

- Language support should be rewritten
- install script didn't support Mysql5 strict mode
- copyright notices should be added
- info.php should be adapted for the 2.6x WB versions
- empty product records in the database should automaticly be deleted
- upgrade script should be added for the upgrade from 1.6.2 as there are new database fields.
- little bit layout and code cleaning.

Will do this tonight based on your 1.6.3 version and then release 1.6.4.

Anyway, thanks for your work on this modul.

Matthias
« Last Edit: November 30, 2006, 12:20:16 PM by ruebenwurzel » Logged

You search for help, please look here: Help-Page
You search for Modules, Templates or Languages, please look here: Addons-Page
tomhung
Master Baker
*****
Offline Offline

Posts: 354


cave_crickett@hotmail.com cave+crickett gbosen
Email
« Reply #3 on: November 30, 2006, 03:52:05 PM »

While you are going through all this... look at places where you are explicitly naming the path.  I tried to change the "install directory" and it breaks stuff!!!

I can help with that later if you want.

G
Logged
ruebenwurzel
Leaders Team
A Baker's Baker
*****
Offline Offline

Posts: 6255


Keep on Rockin


WWW Email
« Reply #4 on: November 30, 2006, 10:37:55 PM »

Hello,

ok, after a few hours working (with breaks) i think i've fixed a few things. Attached you find version 1.6.4RC1.

Changelog:
- Language support rewritten
- added german language file
- install script now support Mysql5 strict mode
- copyright notices added
- info.php adapted for the 2.6x WB versions
- empty product records gets automaticly deleted
- added currency field for to make it usable for more currencys
- currency code is recognized from paypal
- fixed issue in uninstall script
- new layout of admin interface

ToDoList:
- create an upgrade script
- price format now is only 30.50 should also be 30,50
- automatic currenzy like if language EN take $ if language DE take € ....
- add WYSWYG for short and long description

Please test and post possible issues

Matthias

P.S.
@tomhung
Why did you want to change the path. It's hardcoded on 113 places in the modul script. Could be easily done with a search and replace if you need it.
« Last Edit: December 27, 2006, 06:42:22 PM by ruebenwurzel » Logged

You search for help, please look here: Help-Page
You search for Modules, Templates or Languages, please look here: Addons-Page
tomhung
Master Baker
*****
Offline Offline

Posts: 354


cave_crickett@hotmail.com cave+crickett gbosen
Email
« Reply #5 on: November 30, 2006, 11:35:20 PM »

I found the path problem when I installed 2 instances of gocart to test. 
ie. default one and the one I edited.

I changed the $module_directory to be something else.

All the code was pointing to include the original (hardcoded) file not the ones i uploaded.

This issue is prevalent through lots of modules. 

things like
Code:
if(file_exists(WB_PATH."/modules/calendar/languages/".LANGUAGE.".php")) {

should read
Code:
if(file_exists(WB_PATH."/modules/".$module_directory."calendar/languages/".LANGUAGE.".php")) {


just my thoughts.
Logged
ruebenwurzel
Leaders Team
A Baker's Baker
*****
Offline Offline

Posts: 6255


Keep on Rockin


WWW Email
« Reply #6 on: December 01, 2006, 05:47:04 AM »

Hello,

If you look at the "Hello World Module" wich should show developpers whats needed for to create a modul exactly this is used. Define in info.php the directory and in all other files the directory is called with the variable (Include info.php and $module_directory). Problem is at installation, when the modul is temporary unzipped in the temp dir. The include path is relative and as the temp directory is in another level then the modules the $module_directory isn't found (not generally on some hosts). So we couldn't use this technic for all.

Why you need two instances of gocart? Will look at it but i think you can use it on multiple sections in WB wich means you can have different pages with totally different carts. If this is not the case we should fix it.

Saw that the products are only taken by calling the "image_id" without where section_id = section_id. Maybe this fixes it.

Matthias
Logged

You search for help, please look here: Help-Page
You search for Modules, Templates or Languages, please look here: Addons-Page
tomhung
Master Baker
*****
Offline Offline

Posts: 354


cave_crickett@hotmail.com cave+crickett gbosen
Email
« Reply #7 on: December 01, 2006, 03:49:23 PM »

The real problem seems to be that there is no Module Export.  In the template editor you can download the .zip of the template.  I would like something like this for modules. 

I tweaked the module code while it was sitting in place on the server.  This way I could see the changed immediately.  I thought that I could just zip it up in place, download it, change the install directory, upload / install it as a new version. 

The main reason for having two versions on one site is purely testing purposes.  I wanted to see the original GoCart against the one I repackaged. 

I just noticed that the new module wasn't using the info.php variable and was using a hardcoded path.

just my thoughts!
Logged
kriskd
Apprentice Baker
***
Offline Offline

Posts: 61



« Reply #8 on: January 11, 2007, 01:58:08 AM »

Is the most recent one available in the module library, or should I grab it from this thread?
Logged
ruebenwurzel
Leaders Team
A Baker's Baker
*****
Offline Offline

Posts: 6255


Keep on Rockin


WWW Email
« Reply #9 on: January 11, 2007, 05:35:11 AM »

Hello,

the latest version you find on the addons page.

Matthias
Logged

You search for help, please look here: Help-Page
You search for Modules, Templates or Languages, please look here: Addons-Page
kriskd
Apprentice Baker
***
Offline Offline

Posts: 61



« Reply #10 on: January 11, 2007, 11:57:32 PM »

So, how do I add shipping?  Attached is a screen capture of what I see in my GoCart mod.

Logged
tomhung
Master Baker
*****
Offline Offline

Posts: 354


cave_crickett@hotmail.com cave+crickett gbosen
Email
« Reply #11 on: January 12, 2007, 12:26:46 AM »

did you use the code posted above?
Logged
kriskd
Apprentice Baker
***
Offline Offline

Posts: 61



« Reply #12 on: January 12, 2007, 01:03:14 AM »

did you use the code posted above?


No, per ruebenwurzel's post, I assumed that version was in the add-on library.  I'll try the version posted in the thread this weekend.  I've been spending too many late weekday evenings working on this stuff!   grin
Logged
ruebenwurzel
Leaders Team
A Baker's Baker
*****
Offline Offline

Posts: 6255


Keep on Rockin


WWW Email
« Reply #13 on: January 12, 2007, 06:07:38 AM »

@kriskd

Sorry for missleading you. At addons page is version 1.6.2. The latest version is 1.6.4RC1 from here in the thread.

Quote

So please use this version. Will replace the file from the addons page.

Matthias
Logged

You search for help, please look here: Help-Page
You search for Modules, Templates or Languages, please look here: Addons-Page
baZzz
Pending Apprentice Baker
**
Offline Offline

Posts: 49



« Reply #14 on: February 14, 2007, 12:19:34 PM »

Matthias,

Just so you know, the gocart module on the addons pags is still the old version 1.6.2

Regards,
Bas
Logged

-= assumption is the mother of all f*ck ups / to assume makes an ass out of u and me =-
ruebenwurzel
Leaders Team
A Baker's Baker
*****
Offline Offline

Posts: 6255


Keep on Rockin


WWW Email
« Reply #15 on: February 14, 2007, 12:24:14 PM »

Hello,

as you see on the name the 1.6.4 is only a Release Candidate. Before it gets the new version there is something to do. Especially to write an upgrade script to update from previous versions. This is not possible at the moment. You have to uninstall all previous versions with loosing all infos and install the new version. So i hope you understand we can not add such a version as ready to the addons page.

Matthias
Logged

You search for help, please look here: Help-Page
You search for Modules, Templates or Languages, please look here: Addons-Page
baZzz
Pending Apprentice Baker
**
Offline Offline

Posts: 49



« Reply #16 on: February 14, 2007, 01:38:00 PM »

Ah, I see, thought you'd forgotten about it! smiley
Logged

-= assumption is the mother of all f*ck ups / to assume makes an ass out of u and me =-
mlohnen
Pending Apprentice Baker
**
Offline Offline

Posts: 29


WWW Email
« Reply #17 on: February 15, 2007, 07:32:07 AM »

And here's a dutch language file for GoCart module 1.6.4RC1

Logged
baZzz
Pending Apprentice Baker
**
Offline Offline

Posts: 49



« Reply #18 on: February 19, 2007, 07:09:24 PM »

Matthias (or anybody else with a thorough knowledge of gocart),

Do you know what the use is of the following code: (in 'view.php'; line 18 through 29)
Code:
// Get user's username, display name, email, and id - needed for insertion into image info
$users = array();
$query_users = $database->query("SELECT user_id,username,display_name,email FROM ".TABLE_PREFIX."users");
if($query_users->numRows() > 0) {
while($user = $query_users->fetchRow()) {
// Insert user info into users array
$user_id = $user['user_id'];
$users[$user_id]['username'] = $user['username'];
$users[$user_id]['display_name'] = $user['display_name'];
$users[$user_id]['email'] = $user['email'];
}
}
I can see that the array $users is being called in line 154 and 251, but I don't see the use for it. Is it still being used in gocart? (Or is it a remnant from the image gallery it was based on?)

The reason I'm asking this, is because I'm trying to make gocart into a real shopping cart module. For this, I want to understand the entire code and clean it up as much as possible...

Thanks for the help!
Logged

-= assumption is the mother of all f*ck ups / to assume makes an ass out of u and me =-
ruebenwurzel
Leaders Team
A Baker's Baker
*****
Offline Offline

Posts: 6255


Keep on Rockin


WWW Email
« Reply #19 on: February 20, 2007, 08:40:53 AM »

@baZzz

I'm not the first time developper, so i also don't know why this is in view.php. Don't know anny reason for needing this. So if you mean it is not necessary, remove it.

Matthias
Logged

You search for help, please look here: Help-Page
You search for Modules, Templates or Languages, please look here: Addons-Page
Pages: [1] 2 Go Up Print 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!