-
Posts
218 -
Joined
-
Last visited
Everything posted by NooseLadder
-
I currently include a You tube video on a page directly in the body TinyMCE using iframe. <div class="video_container"><iframe src="http://www.youtube.com/embed/somevideo?rel=0&fs=0&modestbranding=1&showinfo=0" width="460" height="260" frameborder="0"></iframe></div><!-- end video_container --> My layout is responsive, as is the video. That's not a problem. At the end of the video there is an animation of an arrow with a call to action pointing to a form to the right of the video. However when the media screen size drops below 768px the form drops below the video (this is correct). But the arrow at the end of the vid is still pointing to the right, whereas it should now be pointing down to the form. I can create another video to do this but is there a way to switch videos at 768px (or any) media size?
-
Thanks Nik, just the job.
-
Thanks Wanze, just what I needed. The Actions tab was collapsed after installation and didn't expand when clicked. ProcessBatcher.module line190 $actions->collapsed = 0; changed to $actions->collapsed = 1; Also, selecting change parent returns a text box rather than a selector, which works if you enter the parent id.
-
Is it possible to change the template on multiple pages quickly? I have many pages using the same template and I want to change them all to another template, all the same.
-
I've just added some redirects and noticed a few things: 1. The bulk import only seems to add the first one in the list. I was entering them in the filed like this: page1.php, page2.php, page3.php etc 2. If I edit any exiting redirect I get this error, but the redirect does work. redirect_from: Error found - please check that it is a valid URL (redirect_from)
-
Trouble using hooks with a PayPal module I'm writing
NooseLadder replied to ffub's topic in Module/Plugin Development
Hi Stephen, Have you made any progress with this? I am really interested in utilising this module along with Apeisa's ShoppingCart/checkout module. -
Module - Shop for Processwire - Selectable options and the cart
NooseLadder replied to NooseLadder's topic in Modules/Plugins
Thanks Apeisa. Implemented as follows: <?php $sizes = $page->children->find("product_size_selector!="); if(count($sizes)) { echo "<form method='post' action='./'> <p style='font-size:90%;'>Select your size: "; foreach($sizes as $product) { echo "<input type='radio' value='{$product->id}' name='sc_product_id'><label style='padding-right:0.5em;'>{$product->product_size_selector->title}</label>"; } echo "</p>"; echo "<p><input type='number' name='sc_qty' value='1'/> <input type='submit' value='Add to basket') /></p> </form>"; } ?> BTW, In module PaymentExample.module this line was missing which prevented the module title appearing in the select payment method dropdown: public function init() { // line 17 $this->title = $this->_("Payment Example"); // This line was missing In PaymentExample.module you output the order details with a comment // No need to really do anything like this on payment module, this is here just for educational purposes): Maybe we can turn this into an invoice to email to the customer and/or for the customer to print as a receipt? -
Has anyone set up and tested Paypal with this module? I found this module PaymentGatewayPayPal.module but am not sure if it is good to go or how to integrate it etc.
-
Module - Shop for Processwire - Selectable options and the cart
NooseLadder replied to NooseLadder's topic in Modules/Plugins
Now I have a page structure like this: -products - Girls -Girls Nightware -Pyjamas type 1 Display - Pyjamas type 1 size 5/6 - Pyjamas type 1 size 7/8 - Pyjamas type 1 size 9/10 The template for Pyjamas type 1 Display shows the single product with a drop-down selector showing the sizes from the children. So the user selects the size on page Pyjamas type 1 Display. The reason for this is so I don't have to display duplicate pages of the same product for each size variation. I would like to pass the size selected to the shopping cart and checkout but this is a bit complicated for me to modify the modules. It looks like the module uses the current page as the product and I don't know how to change this. I need help please. -
Hi, Recently I have been seeing a rise in the number of single page websites, you know the ones that use <a href="#chapter4">See also Chapter 4.</a> <h2><a id="chapter4">Chapter 4</a></h2> <p>This chapter explains about...</p> and with a bit of jQuery to smooth the ride (scrolling) to that section. Some of you may even have made one or two yourselves. I like some sites that I have seen and would like to try this approach but I do have some reservations about the SEO aspects. As you know, search engines index single pages of websites and use the content as well as many other factors to rank that page according to the search string entered by the user. Single pages usually have content about a specific subject, however single page websites will have content about everything the website talks about. Have you got any thoughts about how this may affect sites that need to get ranked highly in the search engines? Or, maybe you have got evidence to show this?
-
Hi, Hopefully if I understand you correctly, you are looking for a way to have truly responsive images that resize to any screen size? I use this: img { height: auto; max-width: 100%; width: auto; } In your html for the <img> omit the width and height attributes and you should end up with something like in these examples below. Just resize your browser. Example 1 Responsive images (in progress, so temporary link) Example 2 Responsive slideshow I hope I have not misunderstood your intentions?
-
Module - Shop for Processwire - Selectable options and the cart
NooseLadder replied to NooseLadder's topic in Modules/Plugins
Thank you all for your explanations, I understand it now. $sizes = $page->children->find("product_size!="); if(count($sizes)) { echo "<p style='font-size:90%;'>Select your size: <select name='size'>"; foreach($sizes as $size) { echo "<option value='{$size->id}'>{$size->product_size}</option>"; } echo "</select></p>"; } The next step is to get the selected $size variable into the shoppingcart module so that it is part of the cart and checkout. Can anyone help with that? -
Module - Shop for Processwire - Selectable options and the cart
NooseLadder replied to NooseLadder's topic in Modules/Plugins
Oh, I thought I read somewhere on this forum that by enclosing the if in quotes it returned true or false. I'm obviously no expert so I will take your advice. Maybe its a fluke but this returns a list of sizes from the children, so I am a bit confused? if("$page->children->product_size") { $sizes = $page->children; echo"<ul>"; foreach($sizes as $size) { echo"<li>{$size->product_size}</li>"; } echo "</ul>"; The product size is a text field because the client is using this sort of sizing 5/6, 7/8. 9/10 (age groups) etc. I would be grateful if you clarify the validity of the code. My main problem is how to post the sizes from the children to the shoppingcart module. -
Hi, I am putting together a site using Apeisa's Shop for Processwire. I need some help to modify the shoppingcart and possibly the checkout module. I would like a size selector (dropdown) on some of the product pages (I suppose it could be anything size, colour etc, but in this case it is size only). -Product List from children (Created with template and php file) -Product 1 (created with template without php file so they are not visible on site, but with the same fields as the top level page) -Product 2 -Product 3 Each product is a size variation only and the size dropdown on the top level page uses the following code: if("$page->children->product_size") { $sizes = $page->children; echo "<p class='size_select'>Select required size: <select name='size'>"; foreach($sizes as $size) { echo "<option value='{$size->id}'>{$size->product_size}</option>"; } echo "</select></p>"; } The shopping uses the current page for the product details. I would like to post the selected size and details from the Product (1,2 or 3) based on what is selected from the dropdown. I hope that makes sense.
-
I used to use a shopping cart software and I thought if I give you some of the set up options from that, it might help you configure a module for PW. First see attached document that shows the basic tax set up for that software. Some of the main set up selections are listed below: TAX MODE Simple or Advanced (select one) SIMPLE TAX Enter a description e.g VAT Enter a message e.g VAT payable on all UK orders Enter a % Rate e.g 20.00 ADVANCED Product Prices Entered Price inclusive of tax or Price exclusive of tax (Select one) Taxes Enter name e.g VAT Tax Rounding Level - Line Item Order (select one) Tax Rounding Method - Truncate, Round Half Down, Standard, Round Up, Banker's Rounding (select one) Tax By Location Always apply taxes, Tax by delivery address, Tax by Invoice address (select one) Tax Zones Add a Zone (you can add multiple zones) - Enter name e.g UK, select countries to be included in that zone e.g England, Scotland, Wales, Northern Ireland and save it. Then in Shipping and Handling section you would select shipping charges made - yes or no. If yes, choose the Tax Rate e.g VAT (as defined in Taxes above, Zero Rated, Exempt, Custom. If custom is selected enter custom rate. Select if handling charges are made. If yes, select Tax Rate (same as for Shipping selection). Then we get into Shipping configuration e.g Simple or By Zone and Class. That's a bit more complicated e.g Simple is a fixed charge e.g. 5.00EUR, By Zone and Class uses various methods like by weight classes and you can set up different postal charges e.g UK - First Class UK - Second Class UK - Standard Parcel etc. There's more info here I hope that helps. Let me know if you need any clarification. tax_set_up.doc
-
If it is any help, this is what I am doing at the moment. I have decided to use a product tree like this: The following I call sections and all these three levels have the same template detailed below called product_section_list: Products -Girls -Girls Nightware <?php // product_section_list if($page->children) { $sections = $page->children; foreach ($sections as $section) { $firstimage = $section->product_images->first(); echo "<div class='product_section'> <div class='img_ctr'><a href='{$section->url}'><img src='{$firstimage->url}' alt='{$firstimage->description}'></a></div> <h3><a href='{$section->url}'>{$section->title}</a></h3> <!--<p style='text-align:center;font-size:90%;'><span class='product_attribute_label' style='margin-left:1em;'>Price:</span> £{$section->sc_price}</p>--> </div>"; }} ?> What this does is create a top-level product section list that links to each child of the section. So a view of the products page would be something like this (images are just for testing purposes): If you then view the section called Girls you get this: The section Girls Bedding uses a different template called product_item_list see below: <?php // product_item_list $currentpage = $page->categories; $prods = $pages->find("template=product_item, categories=$currentpage"); if (count($prods)) { foreach ($prods as $product) { $priceraw = $product->sc_price; $price = number_format($priceraw, 2, '.', ','); $firstimage = $product->product_images->first(); echo "<div class='product_section'> <div class='img_ctr'><a href='{$product->url}'><img src='{$firstimage->url}' alt='{$firstimage->description}'></a></div> <h3><a href='{$product->url}'>{$product->product_name}</a></h3>"; if("$product->product_size") { echo "<p style='text-align:center;font-size:90%;'><span class='product_attribute_label'>Size: </span>{$product->product_size}<span class='product_attribute_label' style='margin-left:1em;'>Price:</span> £{$price}</p>"; } else { echo "<p style='text-align:center;font-size:90%;'><span class='product_attribute_label' style='margin-left:1em;'>Price:</span> £{$price}</p>"; } if ($user->isLoggedin()) { echo "<p style='text-align:center;color:#c00;font-size:80%;'>Hierachy: {$product->product_hierachy}</p> <p style='text-align:center;color:#c00;font-size:80%;'>Category: {$product->categories->title} ({$product->categories})</p>"; } echo "</div>"; }} ?> This displays a list of the individual products under that section as below: The fields called Hierachy and Category in red on the page are only displayed if a user is logged in for admin purposes. That's the part of the code starting if ($user->isLoggedin()). Each individual product is displayed using a template called product_item. <?php //product_item $firstimage = $page->product_images->first(); $priceraw = $page->get("sc_price"); $price = number_format($priceraw, 2, '.', ','); echo "<div class='product'> <div class='col_1'>"; if ("$page->product_images") { echo "<img id='image1' src='{$firstimage->url}' alt='{$firstimage->description}' /> <p>Rollover image to zoom</p>"; } else { echo "<img src='{$config->urls->templates}images/products/image_placeholder.jpg' alt='No image available' />"; } echo "<!-- end .col_1--></div> <div class='col_2'> <div class='product_title'> <h1>{$page->product_name}</h1> <p><span class='product_attribute_label'>Price:</span> £{$price}</p>"; if("$page->product_size") { echo "<p><span class='product_attribute_label'>Size:</span> {$page->product_size}</p>"; } echo "<p class='product_code'>Product code: {$page->product_code}</p> <!-- end .product_title--></div> <p class='product_description'>{$page->product_description}</p> <div class='add_to_cart'>{$modules->get('ShoppingCart')->renderAddToCart($page)}</div> <!-- end .col_2--></div> <!-- end .product--></div> <div class='separator'></div> "; ?> Which give the following layout: And BTW I am using Apeisa's Shopping Cart Module (Thanks Apeisa) There are two main reasons I did it this way: 1. To give the client a product structure they can visually see. 2. I used to run an ecommerce site using Actinic and this is how it's product sections were structured. Whether this is a good or bad way of doing it I don't know but it works for me.
-
That's a good explanation of the process Joss. A code example of above quote would make it complete. P.S. Note to forum admin: Can't seem to delete code wraps if inserted by mistake, like at the top of this post.
-
You are quite right Soma. When I started this I wasn't sure which way to do it so I created the categories field upfront. Now I'm looking for guidance/best practise. So do I use page structure or categories field?
-
Thanks both for your replies. Some food for thought there. @Soma: The part of the code categories=$page below I do not understand and including it returns a blank page. Maybe I have implemented it incorrectly? $prods = $pages->find("template=product, categories=$page");
-
Was this taken any further as I am interested in how to clone/copy pages? Sorry, I have just found the module for this here.
-
I am working on something similar. @Joss: I think this is what you are getting at? I would be grateful if you can confirm. I'm using screenshots to try to explain. I hope this works? First I created a categories page structure: Then I created the products page structure: Then a field called categories of type 'page'. The Basic settings The Details settings The Input settings Add the categories field to the product template, so that you can select the appropriate categories for that product. Some notes. I haven't yet sorted out the template structure for the hierachy. As Ryan said above, I probably need different templates for the categories and sub-categories. I'm also at a point where I need some help displaying the categories. I'm ok with the parent page called 'Boys Nightware' that hold the children as products. If there's a better way to do it please let me know. This is the code in the template for Boys Nightware: <?php if ($page->children) { foreach($page->children as $product) { $firstimage = $product->product_images->first(); echo "<div class='product_section'> <div class='img_ctr'><a href='{$product->url}'><img src='{$firstimage->url}' alt='{$firstimage->description}'></a></div> <h3><a href='{$product->url}'>{$product->product_name}</a></h3> <p style='text-align:center;font-size:90%;'><span class='product_attribute_label'>Size:</span> {$product->product_size}<span class='product_attribute_label' style='margin-left:1em;'>Price:</span> £{$product->sc_price}</p> </div>"; }} ?> Which produces this layout where you click through to a single product page. I now need to work on the templates for the categories above that. Any guidance appreciated.
-
I don't know what happened earlier but on echoing the session id it was clear that there were conflicting id's at different page levels. It all seems to be working fine now.
-
Sorry I forgot to say that I have cleared cookies but still the problem.
-
"No items in cart". This is the output I get when the cart page is in this hierachy: Home -products -product1 -cart When the page is here I get the cart contents rendered: Home -products -product1 -cart
-
This is mine: <?php include_once('includes/the_head.inc.php'); ?> <div class="container"> <?php include_once('includes/the_header.inc.php'); ?> <?php include_once('includes/the_sidebar.inc.php'); ?> <div class="content"> <?php echo $modules->get("ShoppingCart")->renderCart(); ?> <!-- end .content --></div> <!-- end .container --></div> <?php include_once('includes/the_footer.inc.php'); ?> but as I said it only renders the cart when the page is a child of the products. In any position above that it returns "No items in cart". So it is getting to the ShoppinCart module because this is the line that returns that message: if (count($items) == 0) { return $this->_("No items in cart"); } And there are items in the cart as well. This is what I do not understand.