[Pro] Mals Shopping Cart Question

My clients want to “suspend” or put their shopping cart on hold. It is an established site with literally hundreds of buy buttons all tagged to a Mals shopping cart. My client would like the ability to “reactivate” the cart for Christmas sales this December. In other words, deleting all the buy buttons wouldn’t be a great solution because I couldn’t easily reactivate the cart again.

My buy buttons are all “graphic items” with the price of the item integrated into the graphic. I suppose I could set all the buy buttons to “not publish” via the inspector palette. That would probably take me a couple hours for a site this large. Do any of you have any ideas?

Note: the client wants to keep the website live for wholesale orders (to be placed over the phone, so a cart is not necessary), but he does not want to mess with retail sales during the slow months.

I’d love to hear how you might go about tackling this one!

Thanks,

Doty

http://www.rentoys.com


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Doty,
Try adding the following code to the head of all of your store pages;

<style>
<!-- Hide all Mals buy buttons -->
a[href^="http://ww5.aitsafe.com"] {
	display:none;
}
</style>

Essentially what it does is to hide all links to the Mals site. When you are ready to show them again simply remove the code or comment the CSS style back out.
This is untested but it should do the trick for you and a lot quicker than manually removing all of the buttons from your Freeway site - unless the client is paying an hourly rate!
Regards,
Tim.

On 4 Jun 2014, at 20:27, Doty wrote:

I’d love to hear how you might go about tackling this one!


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Oh, I meant to say that if you add !important to the end of that style the menu bar entry for ‘view cart’ will also hide from view;

<style>
<!-- Hide all Mals buy buttons -->
a[href^="http://ww5.aitsafe.com"] {
	display:none !important;
}
</style>

Regards,
Tim.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

What a fantastic idea Tim! Thank you! I will give it a try.

Now, if I hide all my buy buttons, I will also hide all the prices for the individual items. (They’re currently integrated into the same button). If I go through and price everything manually, I would need to go through and remove all these later. Any ideas for that process?

The client is paying hourly, but it won’t help anyone if I “break the bank!”

Doty


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

As far as I can see it you have two options;

  1. Go through the site and manually add in the prices or
  2. Add a script that looks for the product price and adds automatically adds it to the page for you

Doty, you’ve had me working hard on this one but here’s an example of a script that should work for you;
https://dl.dropboxusercontent.com/u/795566/test/RenToys-Hide-Mals-buttons/index.html

If you look at the page source you’ll see the style block that hides the original buy buttons;

<style>
a[href^="http://ww5.aitsafe.com"] {
	display:none !important;
}
</style>

Right at the bottom of the page (just before the end body tag) you’ll find the script that looks for the buy buttons, extracts the price, cleans it up and adds it back into the page.

<script>
//Extract the prices from Mals links and display them on the page

//find all links to mals cart
var allLinks = document.getElementsByTagName("a");
for (var i=0; i < allLinks.length; i++){
	var thisLink = allLinks[i];
	
	//find the item price
	if (thisLink.href && thisLink.href.toString().indexOf("http://ww5.aitsafe.com") > -1){
		var thisHref = thisLink.href.toString();
		
		var priceReg = /(price)(=)(\d+)(&)/g
		if (thisHref.match(priceReg)){
			var theMatch = thisHref.match(priceReg).toString();
			//clean the price
			var price = "$" + theMatch.replace(priceReg,"$3") + ".00";
			//create a parent span tag
			var encSpan = document.createElement('span');
			//add the price to it and style
			encSpan.className = "keithhasstyle";
			encSpan.innerHTML = price;
			var parent = thisLink.parentNode;
			parent.appendChild(encSpan);
		}
		
	}
}
</script>

If you add the CSS to the page head (Page > Insert Markup > before ) and the script to the page (Page > Insert Markup > Before ) then they should do what you want without having to wade through the site and manually update it page by page.
Regards,
Tim.

On 6 Jun 2014, at 21:45, Doty wrote:

Now, if I hide all my buy buttons, I will also hide all the prices for the individual items. (They’re currently integrated into the same button). If I go through and price everything manually, I would need to go through and remove all these later. Any ideas for that process?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

If you add the CSS to the page head (Page > Insert Markup > before ) and the script to the page (Page > Insert Markup > Before )

That should actually read:

If you add the CSS to the page head (Page > HTML Markup > before ) and the script to the page (Page > HTML Markup > Before )

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks Dave. I did that from memory and should have checked.
Regards,
Tim.

On 7 Jun 2014, at 01:24, DeltaDave wrote:

If you add the CSS to the page head (Page > HTML Markup > before ) and the script to the page (Page > HTML Markup > Before )


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

WOW! Tim & Dave! Thank you!!!

I’m sorry to be slow to reply. I’ve been dealing with my kiddo who’s come down with pneumonia, but I will start work on this right away! If I can pull this off you will save me hours and hours of work! I’ll keep you posted.

Doty


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Tim,

I’m having great success with your CSS & script. Thank you so much! Can I ask one other favor?

If you look at this page: http://www.rentoys.com/store/polearms.html you will see that there are two prices listed for the final item on that page. That is because that item comes in two sizes with two prices. I’m wondering how difficult it would be to tweak your script to extract not only the price from the Mals button, but the product name also.

On the polearm page there is only one such area where this happens, but if you look on a page like this one http://www.rentoys.com/store/Swords/hardwoodswords.html you can see the various options available create a headache.

I realize that since this script is applied to the entire page it’s all all or nothing affair in terms of adding the product name. But what are your thoughts?

Doty


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Doty,
I’ve sent you an updated script which should do what you want and displays the product name as well as the price in place of the old buy buttons.
Regards,
Tim.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Wow, Tim, I can’t thank you enough for all this! I’m curious about something…

Is there a way to do this on an item by item basis? In other words, my buy buttons are a rollover item and as such are contained inside a group. The top level of that group is where I have the buy button action applied. Would it be possible to attach this kind of css and/or script to that individual item? (Perhaps through the Item > Extended… dialogue box?) I’m wondering if this level of granularity is possible.

This isn’t a problem I’m asking you to solve, I’m just thinking that something like what I’m doing on my individual pages would be awesome to apply to individual items for example when an item is backordered. Then, when it becomes available again, I could remove the extra code and have a functional buy button again.

Thanks again. I’ll play with your script tomorrow and see what comes of it!

Doty


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Doty,
The Mals cart doesn’t natively have any concept of stock control so it can’t automatically disable buy buttons by itself. I think if you had to go through the site and apply a script to various items in your Freeway document you may be inclined to simply unpublish the buy button and add a simple label that says the item is out of stock.

the think about the current script is that you set it once and it’ll apply itself to all buy buttons it finds in the site. It is a very general script and may be too broad in places but the benefits are that it hardly needs any manual setup.

I’ll have a think about this as I could add an option to the existing Mals Actions that keeps the item on the page but lists the item as temporarily unavailable so can’t be purchased.
Regards,
Tim.

On 11 Jun 2014, at 00:54, Doty wrote:

I’m just thinking that something like what I’m doing on my individual pages would be awesome to apply to individual items for example when an item is backordered. Then, when it becomes available again, I could remove the extra code and have a functional buy button again.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Usually, when you are dealing with stock levels, you are eventually drawn to a system that you use in both your stock-keeping operation and your point-of-sale and your Web sales. One database, one source of truth for inventory, and no double-entry or double-effort required.

Mals doesn’t try to bite off this side of the sales problem – they are after much lower-hanging fruit than that.

I have built these types of systems for people in and out of the Freeway community. It’s not cheap, but if you have a sales process that relies on accurate inventory information (say you maybe only have three of a thing ever, like berths on a yacht cruise on a certain date), or if your volume is high enough that my fees are nothing but a rounding error on what you would lose if your customers became disenchanted by not being able to buy what they want right now, then that makes a lot of sense to do.

When you’re stuck in the middle of those extremes, you will either decide to invest in a solution ahead of being able to afford it, or use your “sweat equity” to prop up this hole in your more affordable cart system.

I hope that Tim can engineer a solution for you that keys into Mals and Freeway. But if you want the larger solution, I can help you there as well.

Walter

On Jun 11, 2014, at 4:19 AM, Tim Plumb wrote:

Hi Doty,
The Mals cart doesn’t natively have any concept of stock control so it can’t automatically disable buy buttons by itself. I think if you had to go through the site and apply a script to various items in your Freeway document you may be inclined to simply unpublish the buy button and add a simple label that says the item is out of stock.

the think about the current script is that you set it once and it’ll apply itself to all buy buttons it finds in the site. It is a very general script and may be too broad in places but the benefits are that it hardly needs any manual setup.

I’ll have a think about this as I could add an option to the existing Mals Actions that keeps the item on the page but lists the item as temporarily unavailable so can’t be purchased.
Regards,
Tim.

On 11 Jun 2014, at 00:54, Doty wrote:

I’m just thinking that something like what I’m doing on my individual pages would be awesome to apply to individual items for example when an item is backordered. Then, when it becomes available again, I could remove the extra code and have a functional buy button again.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Walter,

Thanks for your thoughts. You describe the problem very well. I wish they had a formal inventory system, but they don’t and never will. It’s a family run business and there are too many variables that impede efficiency. It’s an interesting “nut to crack” and I look forward to seeing what Tim might be able to do.

Doty


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options