Jump to content

Recommended Posts

Posted

Guys, great work! If you need my help with shopping modules just let me know. I hope to find some time to improve them.

  • Like 2
Posted

Hey,

will do some little work this week on the site profile.

I decided to switch the template from semi fluid to a static width.

I think for a basic profile it´s not necessary to use the fluid grid and it would make some things easier.

Next step will be the checkout process.

@ Apeisa: Found some issues in your module, there are many hardcoded english sentences in it, I think it would make it hard for unexperienced end-users to edit them. I think it would be helpful to let the user set them up in admin backend. Do you see a option to implement this feature?

@anybody interested: I´m using the great Ergo admin template for the backend. Is there a way to modify the home page of the admin to quick add a product?

Think it would enhance the usability if we provide some shop functions directly on the admin entry page, like adding a product, statistics, stuff like this.

Will do a post after uploading the next update.

Posted

Luis: there might be few non-multilang strings on ShoppingOrdersManagement, but other modules should be 100% multilang. Those are fully translatable through PW language translator.

  • 2 weeks later...
  • 3 weeks later...
  • 1 month later...
Posted

Hi Luis

Any chance you can post a screenshot?

I'm trying to describe this profile in another forum topic but the link seems to be throwing a ProcessWire error.

Posted

I better not tell you that I dropped the database by mistake on my "Fail day"

But I still have the tempalte files... :-/

Posted

Oops!

Well having the templates is good, so even if you can't remember what fields you added the template code will give you an idea :)

Posted

For those interested. 

Requires the shop module installed, code not well documented and from the my first steps in PW time. So be honest with me ;)

templates.zip

  • Like 3
  • 2 months later...
Posted

Sorry in advance for "abusing" this thread for my question:

I have something like this (very simplified) code to iterate through all products and output e.g. the price:

foreach ( $page->children as $product ) {
    echo $modules->get( "ShoppingCart" )->renderPrice( $product->sc_price );
}

The output of products happens quite often on the website, so I wanted to source it out into a function, something like:

function productListing( $base ) {
    $str = "";
    foreach ( $base as $product ) {
        $str .= $modules->get( "ShoppingCart" )->renderPrice( $product->sc_price );
    }
    return $str;
}

and call it like this:

echo productListing( $page->children );

The problem with the function is that it doesn’t work. I get this error: Error:     Call to a member function get() on a non-object

So calling get() inside a function doesn’t work. Why?

Posted

because of variable scope. The problem is not the get() method, but the variable $modules. You could pass it as a parameter of your functions, or use the equivalent  wire('modules') instead, since functions are not affected by scope:

$str .= wire('modules')->get( "ShoppingCart" )->renderPrice( $product->sc_price );
  • Like 1
  • 5 months later...
Posted

First of all, great work from everyone who contributed to this module so far.

I'm totally new to ProcessWire but I instantly fell in love with the system...

Now I have two questions.

First:

@Luis: Is it correct that http://besser-landen.de/shop/ is from you and based upon the Shop-for-ProcessWire module?

If so, would it be possible to share the paypal checkout module and maybe even the whole template?

I saw you posted a template already but as far as I can tell it is not the same version you're now running...

Second:

@apaisa

I set up the webshop as you described it at https://github.com/apeisa/Shop-for-ProcessWire (in the ReadMe).

I recognized an odd behavior:

I can add products to the cart and if I go to the cart they are listed,

$modules->get('ShoppingCart')->getNumberOfItems();

also gives me the right amount of different products added to the cart. But as soon as I proceed to the checkout page it gives me an error "Your shopping cart is empty." and the code posted above also returns 0.

Totally strange, isn't it? What could be the reason and how can I avoid it?

Posted

haha. I do get them. it's other discussion how fast I forget about them...

Just looked the pr and it seems to be safe merge.

  • Like 1
Posted

Thank you Soma

It works perfect for me (and makes absolutely sense). This little tweak should definitely be integrated in the github- trunk.

It's such a great pleasure to see members in a support forum that really know what they are talking about. The last three years I've worked with joomla and it was horrible because 95% of all the answers from "experienced" admins where about clicking something and installing another module...

Thanks again!

  • Like 3

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...