Basket Module help

tseyigai

Joined: 2012-11-06
Posts: 47
Posted: Wed, 2012-11-07 17:18

So, I installed the basket, but I can't for the life of me, figure out "how" to change values, like "cost" "description," et. I read the docs on this but can't get it.

I need something simplier to use or find the actually folder to edit.

Tseyigai

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2012-11-07 17:21

If all else fails read the instructions http://codex.gallery2.org/Gallery3:Modules:basket

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
tseyigai

Joined: 2012-11-06
Posts: 47
Posted: Wed, 2012-11-07 18:08

Yea, I've looked through ALL of that, and really it's rather difficult to find where even with the documentation, that one
could edit email fields, the product,price,etc.

I may just not use it,unless there's a simple solution.

Tseyigai

 
jnash
jnash's picture

Joined: 2004-08-02
Posts: 814
Posted: Wed, 2012-11-07 18:14

I just installed this for a test, and the instructions appear to be rather clear to me. Is there a particular point you're getting stuck on or don't understand?

The email fields are edited via the configure page, the item description/prices are edited via the Product Lines page, the shipping prices are edited via Postage Bands section.

 
tseyigai

Joined: 2012-11-06
Posts: 47
Posted: Wed, 2012-11-07 18:33

Ok. so here's the CONFIGURE PAGE:

I CAN'T SEE WHERE TO DO IT HERE FOR IMPUTING MY EMAIL. PERHAPS YOU CAN EDIT THIS FIELD IN BOLD OR WHATEVER. I'LL ALSO POST THE PRODUCT LINE'S PAGE.

<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 Bharat Mediratta
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/

class Admin_Configure_Controller extends Controller
{
/**
* the index page of the user homes admin
*/
public function index()
{
$form = basket::get_configure_form();
if (request::method() == "post") {
access::verify_csrf();

if ($form->validate()) {

basket::extractForm($form);
message::success(t("Basket Module Configured!"));
}
}
else
{
basket::populateForm($form);
}

$view = new Admin_View("admin.html");
$view->content = new View("admin_configure.html");

$view->content->form = $form;

print $view;
}

/**
* the index page of the user homes admin
*/
public function templates()
{
$form = basket::get_template_form();
if (request::method() == "post") {
access::verify_csrf();

if ($form->validate()) {

basket::extractTemplateForm($form);
message::success(t("Basket Module Configured!"));
}
}
else
{
basket::populateTemplateForm($form);
}

$view = new Admin_View("admin.html");
$view->content = new View("admin_templates.html");

$view->content->form = $form;

print $view;
}

public function paypal_encrypt_wizard_step1()
{
$view = new Admin_View("admin.html");
$view->content = new View("pew1.html");

$view->content->form = self::keyGenerationForm();

print $view;

}

public function paypal_encrypt_wizard_step2()
{
access::verify_csrf();

$form = self::keyGenerationForm();

if (!$form->validate()) {

self::paypal_encrypt_wizard_step1();
return;
}

$ssldir = str_replace('\\','/',VARPATH.'certificate');
$ssldir= rtrim($ssldir, '/').'/';

if ( ! is_dir($ssldir))
{
// Create the upload directory
mkdir($ssldir, 0777, TRUE);
}

$prkeyfile = $ssldir . "myprvkey.pem";
$pubcertfile = $ssldir . "mypubcert.pem";
$certreqfile = $ssldir . "mycertreq.pem";

$dn = array("countryName" => $form->encrypt->countryName->value,
"stateOrProvinceName" => $form->encrypt->stateOrProvinceName->value,
"localityName" => $form->encrypt->localityName->value,
"organizationName" => $form->encrypt->organizationName->value,
"organizationalUnitName" => $form->encrypt->organizationalUnitName->value,
"commonName" => $form->encrypt->commonName->value,
"emailAddress" => $form->encrypt->emailAddress->value);
$privkeypass = $form->encrypt->privKeyPass->value;
$numberofdays = 365;
$config = array(
"private_key_bits" => 1024
);

$privkey = openssl_pkey_new($config);
$csr = openssl_csr_new($dn, $privkey);
$sscert = openssl_csr_sign($csr, null, $privkey, $numberofdays);
openssl_x509_export($sscert, $publickey);
openssl_pkey_export($privkey, $privatekey, $privkeypass);
openssl_csr_export($csr, $csrStr);

openssl_x509_export_to_file($sscert, $pubcertfile);
openssl_pkey_export_to_file ($privkey, $prkeyfile, $privkeypass);
openssl_csr_export_to_file($csr, $certreqfile);

//echo "Your Public Certificate has been saved to " . $pubcertfile . "<br><br>";
//echo "Your Private Key has been saved to " . $prkeyfile . "<br><br>";
//echo "Your Certificate Request has been saved to " . $certreqfile . "<br><br>";

//echo $privatekey; // Will hold the exported PriKey
//echo $publickey; // Will hold the exported PubKey
//echo $csrStr; // Will hold the exported Certificate
}

private function keyGenerationForm()
{
$form = new Forge("admin/configure/paypal_encrypt_wizard_step2", "", "post", array("id" => "generateKeys", "name" =>"generateKeys"));
$group = $form->group("encrypt")->label(t("Key Generation Details"));
$group->input("countryName")->label(t("Country Name"))->id("countryName");
$group->input("stateOrProvinceName")->label(t("State or Province Name"))->id("stateOrProvinceName");
$group->input("localityName")->label(t("Locality Name"))->id("localityName");
$group->input("organizationName")->label(t("Organization Name"))->id("organizationName");
$group->input("organizationalUnitName")->label(t("Organizational Unit Name"))->id("organizationalUnitName");
$group->input("commonName")->label(t("Common Name"))->id("commonName");
$group->input("emailAddress")->label(t("tseyigai@yahoo.com"))->id("emailAddress");
$group->input("privKeyPass")->label(t("Private Key Pass"))->id("privkeypass");
return $form;
}

}

 
tseyigai

Joined: 2012-11-06
Posts: 47
Posted: Wed, 2012-11-07 18:34

HERE NOW IS THE PRODUCT'S PAGE. I have several different types of artwork and prices, so I don't have an idea how they might be edited.

<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2009 Bharat Mediratta
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/

class Admin_Product_Lines_Controller extends Controller
{
/**
* the index page of the user homes admin
*/
public function index()
{
$view = new Admin_View("admin.html");
$view->content = new View("admin_product_lines.html");
$view->content->products = ORM::factory("product")->order_by("name")->find_all();

print $view;
}

public function add_product_form() {
print product::get_add_form_admin();
}

public function add_product() {
access::verify_csrf();

$form = product::get_add_form_admin();
$valid = $form->validate();
$name = $form->add_product->inputs["name"]->value;
$product = ORM::factory("product")->where("name", "=", $name)->find();
if ($product->loaded()) {
$form->add_product->inputs["name"]->add_error("in_use", 1);
$valid = false;
}

if ($valid) {
$product = product::create(
$name,
$form->add_product->cost->value,
$form->add_product->description->value,
$form->add_product->postage_band->value
);

$product->save();
message::success(t("Created product %product_name", array(
"product_name" => html::clean($product->name))));
print json::reply(array("result" => "success"));
} else {
print $form;
}
}

public function delete_product_form($id) {
$product = ORM::factory("product", $id);
if (!$product->loaded()) {
kohana::show_404();
}
print product::get_delete_form_admin($product);
}

public function delete_product($id) {
access::verify_csrf();

$product = ORM::factory("product", $id);
if (!$product->loaded()) {
kohana::show_404();
}

$form = product::get_delete_form_admin($product);
if($form->validate()) {
$name = $product->name;
$product->delete();
} else {
print $form;
}

$message = t("Deleted user %product_name", array("product_name" => html::clean($name)));
log::success("user", $message);
message::success($message);
print json::reply(array("result" => "success"));
}

public function edit_product($id) {
access::verify_csrf();

$product = ORM::factory("product", $id);
if (!$product->loaded()) {
kohana::show_404();
}

$form = product::get_edit_form_admin($product);
$valid = $form->validate();
if ($valid) {
$new_name = $form->edit_product->inputs["name"]->value;
if ($new_name != $product->name &&
ORM::factory("product")
->where("name", "=", $new_name)
->where("id","!=", $product->id)
->find()
->loaded()) {
$form->edit_product->inputs["name"]->add_error("in_use", 1);
$valid = false;
} else {
$product->name = $new_name;
}
}

if ($valid) {
$product->cost = $form->edit_product->cost->value;
$product->description = $form->edit_product->description->value;
$product->postage_band_id = $form->edit_product->postage_band->value;
$product->save();

message::success(t("Changed product %product_name",
array("product_name" => html::clean($product->name))));
print json::reply(array("result" => "success"));
} else {
print $form;
}
}

public function edit_product_form($id) {
$product = ORM::factory("product", $id);
if (!$product->loaded()) {
kohana::show_404();
}

$form = product::get_edit_form_admin($product);

print $form;
}

}

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2012-11-07 23:05

You're kidding right?
the instructions say to edit those php files?

Look for admin entries for the basket module in your site's admin menu

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
tseyigai

Joined: 2012-11-06
Posts: 47
Posted: Wed, 2012-11-07 23:32

Why would I be kidding? Like I haven't already looked there?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2012-11-08 00:11

I just spent my time and downloaded this module, uploaded -> installed and here is a screenshot of what I get:
[img]http://gallery.menalto.com/files/basket.jpg[/img]

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
tseyigai

Joined: 2012-11-06
Posts: 47
Posted: Thu, 2012-11-08 02:09

OK, I see that. Hmmmm. I uploaded the basket to the correct folder into the module for the theme I'm using. I don't see it however, in the drop down menu like your shows up though.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2012-11-08 02:13

Did you activate the module in admin -> modules?

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
tseyigai

Joined: 2012-11-06
Posts: 47
Posted: Thu, 2012-11-08 02:42

I finally got it. I uploaded to themes this time instead of into modules in my folder. Then I was able to find it in administration with the different menu items there. thank you for your help. It may well prove to be much more detailed and time consuming for me to set it, because of having around 60 different paintings. I may need a good contact application now for setting it up. You know where that might be found?

Thanks again guy.

Tseyigai

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2012-11-08 05:30

If the docs are not clear then please make specific changes to contribute back. If you can't/don't want to, please make specific suggestions so other can benefit.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
loptap

Joined: 2012-06-20
Posts: 11
Posted: Fri, 2012-11-09 23:06
Quote:
I just spent my time and downloaded this module, uploaded -> installed and here is a screenshot of what I get:

VERY interested to see your screenshot. I have been playing around with the shopping basket - essentially testing before going live with it - and a couple of weeks ago I made a mental note to find out what I had done to end up with the 'View Orders' link sitting up next to the logo (I am using a customised theme to make the gallery3 look 'match' my main website). Now I can see it was nothing I had done - and you have probably saved me a fair amount of investigative time!
Thanks!
(maybe I should use that time to see if I can reposition the link!)