Jump to content

Recommended Posts

Posted

Hi,

We are thinking using PW to do a site. One of the perequisites will be, in phase 2, a simple cart.  I am aware of the Shop-for-Processwire module. However, it is not marked as 2.5 compatible. Have you exeperienced any trouble using it with 2.5? 

Posted

I am using this module with 2.5.10 dev version and i see 1 issue for updating current cart not working, maybe it causing from my mods. I have some modifications for form validations and call custom view files. 

  • 1 month later...
  • 4 weeks later...
Posted

Hello,

I installed the shop-module.

- Adding the sc_price and sc_qty to my product-template.

post-3100-0-64796000-1424339676_thumb.pn

The product-template has no template-file, because I made a (parent) list products.php

This list works, also displays the 'sc_price' for each product.

post-3100-0-51899700-1424339675_thumb.pn

I mean this code below generates a 'buy'-button?

echo $modules->get("ShoppingCart")->renderAddToCart();

I put this in my products.php template:

<?php
      	$products = $pages->find("template=product");
      	foreach($products as $product) {
            echo "<h3>{$product->title}</h3>";
            echo "<p>{$product->sc_price}</p>";
            echo $modules->get("ShoppingCart")->renderAddToCart();
        };
?>

But it don't show a 'buy'-button or whatever  ???

Sorry, i'm a newbie, what do i wrong?? Who can help me?  :undecided:

Is there a good tutorial with screenshots or video-tutorial how setup this modules(s)?

At this moment only the ShoppingCart-module is installed.

Grtz,

Christophe

Posted

Pass the product to renderAddToCart:

echo $modules->get("ShoppingCart")->renderAddToCart($product);

The method tries to use the current page as the product page for which to render the button if none is passed as its argument, but since you're calling it from a non-product page without an sc_price field, it doesn't find anything to render.

  • Like 1
Posted

Pass the product to renderAddToCart:

echo $modules->get("ShoppingCart")->renderAddToCart($product);

The method tries to use the current page as the product page for which to render the button if none is passed as its argument, but since you're calling it from a non-product page without an sc_price field, it doesn't find anything to render.

Hi BitPoet,

Thanks for your advice.

I try it!

Regards,

Christophe

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...