Jump to:

2084 Posts in 1005 Topics by 453 members

E-Commerce Modules

SilverStripe Forums » E-Commerce Modules » Problem with layout, Code not parsing properly

Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.

Moderators: martimiz, Nicolaas, Sean, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1189 Views
  • Polawat
    Community Member
    4 Posts

    Problem with layout, Code not parsing properly Link to this post


    I've been pulling my hair here. I have installed SS and it is running OK, using the default BlackCandy theme. Then, I installed the E-Commerce and payment module. When I enter the product page, the product menu as well as a few places on the page are messed up. See attached image on how it looks like.

    Then, I checked out the source of the published page (view source from the browser), and found out that some PHP code did not get parsed correctly. For example, the code for the "Product Group A" link loos like this:

    <li class="current"><a href="/product-group-a/" title="<% sprintf(_t("GOTOPAGE","Go to the %s page"),Flying Floor-Whizzers) %>" class="current levela"><span><em>Product Group A</em></span></a></li>

    I tried deleting the modules and reinstall, but ended up with the same result. All other aspects of the modules, such as adding stuffs to the cart, increase & decrease quantity, and check out, seems to be working OK.

    I'd apreciate of anyone can help.

    By the way, my SS version is 2.3 and ecommerce is 0.6 beta1.

    Attached Files
  • Polawat
    Community Member
    4 Posts

    Re: Problem with layout, Code not parsing properly Link to this post

    Consider this case closed. I read through the code and realized that the sprintf is mainly for the link's title. It was meant to support of multi-linguage site (i18n) e.g. to specify title of the product link in different languages.

    I don't know if any body runs into this problem. Maybe it's the server thing, because it looks ok on my WAMP development environment before I uploaded to the linux production site. Anyway, what I did was remove the sprintf all together and it worked. Here's an example of the code:

    Original code in ProductMenu.ss:

    <a href="$Link" title="<% sprintf(_t("GOTOPAGE","Go to the %s page"),$Title.XML) %>" class="$LinkingMode levela"><span><em>$MenuTitle.XML</em></span></a>

    Change to:

    <a href="$Link" title="Go to the $Title.XML page" class="$LinkingMode levela"><span><em>$MenuTitle.XML</em></span></a>

    Though I solved my own problem, I would appreciate if anyone can tell me what really was the problem. My site is an English only site, but I may have future projects that need to use this feature.


Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.