Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

E-Commerce Modules /

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, Ed, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba

Problem with layout, Code not parsing properly


Go to End


2 Posts   1928 Views

Avatar
Polawat

Community Member, 4 Posts

9 September 2009 at 10:31pm

Edited: 16/09/2009 11:06pm

Hi,

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
Avatar
Polawat

Community Member, 4 Posts

16 September 2009 at 5:06am

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.

--Cheers